diff --git a/Makefile b/Makefile index 178b0e8..4562f30 100644 --- a/Makefile +++ b/Makefile @@ -117,17 +117,15 @@ INSTALL_TARGETS := $(addprefix install-,$(CMDS)) all: debug setup dep format lint test bench build dist -release-major: bump-major +git-push: git push origin main --tags git push github main --tags -release-minor: bump-minor - git push origin main --tags - git push github main --tags +release-major: bump-major git-push -release-patch: bump-patch - git push origin main --tags - git push github main --tags +release-minor: bump-minor git-push + +release-patch: bump-patch git-push setup: setup-dirs setup-build setup-format setup-lint setup-reports setup-bump diff --git a/cmd/obp/cmd/validate.go b/cmd/obp/cmd/validate.go index f2b5c2c..356638a 100644 --- a/cmd/obp/cmd/validate.go +++ b/cmd/obp/cmd/validate.go @@ -45,16 +45,16 @@ var validateCmd = &cobra.Command{ if err != nil { return fmt.Errorf("error generating absolute path for %q", target) } - target, err := os.Open(absPath) + file, err := os.Open(absPath) if err != nil { return fmt.Errorf("could not open target file: %w", err) } - defer target.Close() - err = obp.Validate(schema, target) + defer file.Close() + err = obp.Validate(schema, file) if err != nil { details, ok := err.(*jsonschema.ValidationError) if !ok { - return err + return fmt.Errorf("eror validating %q: %w", path, err) } obp.PrettyDetails(cmd.OutOrStdout(), viper.GetString("format"), details.DetailedOutput(), absPath) } @@ -89,5 +89,4 @@ func init() { if err != nil { log.Panicln("error binding viper to format flag:", err) } - }