Skip to content

Commit

Permalink
Update-codegen needs a specific path
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome committed Dec 14, 2021
1 parent 9197648 commit 959091a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
make update-crds && git diff --name-only --exit-code deployments/common/crds* deployments/helm-chart/crds*
- name: Check if Codegen changed
run: |
sed -i 's,github.com/nginxinc/kubernetes-ingress,runner/work/kubernetes-ingress/kubernetes-ingress,g' ./hack/update-codegen.sh
make update-codegen && git diff --name-only --exit-code pkg/**/zz_generated.deepcopy.go
binary:
Expand Down
3 changes: 2 additions & 1 deletion hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
set -o errexit
set -o nounset
set -o pipefail
set -o xtrace

SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
CODEGEN_VERSION=$(grep 'k8s.io/code-generator' go.sum | awk '{print $2}' | sed 's/\/go.mod//g' | tail -1)
CODEGEN_PKG=$(echo `go env GOPATH`"/pkg/mod/k8s.io/code-generator@${CODEGEN_VERSION}")
CODEGEN_PKG=$(echo $(go env GOPATH)"/pkg/mod/k8s.io/code-generator@${CODEGEN_VERSION}")

if [[ ! -d ${CODEGEN_PKG} ]]; then
echo "${CODEGEN_PKG} is missing. Running 'go mod download'."
Expand Down

0 comments on commit 959091a

Please sign in to comment.