diff --git a/.github/workflows/check-codegen.yml b/.github/workflows/check-codegen.yml index 61f857ea6..feeeeab19 100644 --- a/.github/workflows/check-codegen.yml +++ b/.github/workflows/check-codegen.yml @@ -14,11 +14,6 @@ jobs: - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - - name: Download k8s.io/code-generator - run: | - CODE_GEN_VERSION=$(go list -m -f '{{.Version}}' k8s.io/code-generator) - go get k8s.io/code-generator@$CODE_GEN_VERSION - echo "CODE_GEN_DIR=$(go list -m -f '{{.Dir}}' k8s.io/code-generator)" >> $GITHUB_ENV - name: Run make generate run: make generate - name: Compare the expected and actual generated/* directories diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1112c1917..c5b637f2f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,10 +16,5 @@ jobs: - uses: actions/setup-go@v5 with: go-version-file: 'go.mod' - - name: Download k8s.io/code-generator - run: | - CODE_GEN_VERSION=$(go list -m -f '{{.Version}}' k8s.io/code-generator) - go get k8s.io/code-generator@$CODE_GEN_VERSION - echo "CODE_GEN_DIR=$(go list -m -f '{{.Dir}}' k8s.io/code-generator)" >> $GITHUB_ENV - name: Run make test run: make test diff --git a/hack/update-codegen.sh b/hack/update-codegen.sh index 0c29e7d0a..2e51ab62f 100755 --- a/hack/update-codegen.sh +++ b/hack/update-codegen.sh @@ -8,7 +8,7 @@ THIS_PKG="github.com/ironcore-dev/ironcore" SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" PROJECT_ROOT="$SCRIPT_DIR/.." -CODE_GEN_DIR="${CODE_GEN_DIR:-$(go list -m -f '{{.Dir}}' k8s.io/code-generator)}" +CODE_GEN_DIR=$(go list -m -f '{{.Dir}}' k8s.io/code-generator) source "${CODE_GEN_DIR}/kube_codegen.sh" export TERM="xterm-256color"