Skip to content

Commit

Permalink
fix(ci): verify codegen script
Browse files Browse the repository at this point in the history
  • Loading branch information
bostrt committed Jun 30, 2022
1 parent 3d62d54 commit f04616f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ unexport GOFLAGS
build: update
go build -o openshift-provider-cert $(GO_BUILD_FLAGS)

.PHONY: update
.PHONY: generate
update:
./hack/update-generated-bindata.sh

.PHONY: verify-codegen
verify-codegen:
./hack/verify-codegen.sh

.PHONY: cross-build-windows-amd64
cross-build-windows-amd64:
GOOS=windows GOARCH=amd64 go build -o openshift-provider-cert.exe $(GO_BUILD_FLAGS)
Expand Down
16 changes: 16 additions & 0 deletions hack/verify-codegen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

if [ "$IS_CONTAINER" != "" ]; then
go install github.com/go-bindata/go-bindata/go-bindata@latest
set -xe
./hack/update-generated-bindata.sh
set +ex
git diff --exit-code
else
podman run --rm \
--env IS_CONTAINER=TRUE \
--volume "${PWD}:/go/src/github.com/redhat-openshift-ecosystem/provider-certification-tool:z" \
--workdir /go/src/github.com/redhat-openshift-ecosystem/provider-certification-tool \
docker.io/golang:1.17 \
./hack/verify-codegen.sh "${@}"
fi

0 comments on commit f04616f

Please sign in to comment.