Skip to content

Commit

Permalink
[KOGITO-1516] Allow "make vet" to work from any directory (apache#225)
Browse files Browse the repository at this point in the history
Use the canonical path ("github.com/kiegroup/kogito-cloud-operator")
instead of the relative path as argument to the "-i" flag when running
the openapi-gen command, allowing this script to be ran from any
directory without making any modifications.
  • Loading branch information
LCaparelli authored and MarianMacik committed Oct 3, 2023
1 parent a5c4bba commit 7b63218
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hack/go-vet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ if [[ -z ${CI} ]]; then
which ./bin/openapi-gen > /dev/null || go build -o ./bin/openapi-gen k8s.io/kube-openapi/cmd/openapi-gen
# generate the openapi files
echo "Generating openapi files"
./bin/openapi-gen --logtostderr=true -o "" -i ./pkg/apis/app/v1alpha1 -O zz_generated.openapi -p ./pkg/apis/app/v1alpha1 -h ./hack/boilerplate.go.txt -r "-"
./bin/openapi-gen --logtostderr=true -o "" -i ./pkg/apis/kafka/v1beta1 -O zz_generated.openapi -p ./pkg/apis/kafka/v1beta1 -h ./hack/boilerplate.go.txt -r "-"
./bin/openapi-gen --logtostderr=true -o "" -i github.com/kiegroup/kogito-cloud-operator/pkg/apis/app/v1alpha1 -O zz_generated.openapi -p ./pkg/apis/app/v1alpha1 -h ./hack/boilerplate.go.txt -r "-"
./bin/openapi-gen --logtostderr=true -o "" -i github.com/kiegroup/kogito-cloud-operator/pkg/apis/kafka/v1beta1 -O zz_generated.openapi -p ./pkg/apis/kafka/v1beta1 -h ./hack/boilerplate.go.txt -r "-"

operator-sdk generate csv --csv-version 0.9.0 --update-crds --operator-name kogito-operator
fi
go vet ./...
go vet ./...

0 comments on commit 7b63218

Please sign in to comment.