Skip to content

Commit

Permalink
Merge pull request #399 from mgencur/chmod_codegen_1.12
Browse files Browse the repository at this point in the history
[release-v1.12] Patch for chmod on codegen files
  • Loading branch information
mgencur authored Nov 13, 2023
2 parents f76bcc4 + 4aed48e commit 31b2733
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
12 changes: 12 additions & 0 deletions openshift/patches/027-chmod-codegen.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/vendor/knative.dev/hack/codegen-library.sh b/vendor/knative.dev/hack/codegen-library.sh
index d9cf1ce7e..0f21d457e 100644
--- a/vendor/knative.dev/hack/codegen-library.sh
+++ b/vendor/knative.dev/hack/codegen-library.sh
@@ -31,5 +31,5 @@ export GOBIN=${GOPATH}/bin # Set GOBIN explicitly as deepcopy-gen is installed b
export CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${REPO_ROOT_DIR}; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../code-generator)}
export KNATIVE_CODEGEN_PKG=${KNATIVE_CODEGEN_PKG:-$(cd ${REPO_ROOT_DIR}; ls -d -1 ./vendor/knative.dev/pkg 2>/dev/null || echo "${REPO_ROOT_DIR}")}

-chmod +x ${CODEGEN_PKG}/generate-groups.sh
-chmod +x ${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh
+[ -x ${CODEGEN_PKG}/generate-groups.sh ] || chmod +x ${CODEGEN_PKG}/generate-groups.sh
+[ -x ${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh ] || chmod +x ${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh
1 change: 1 addition & 0 deletions openshift/release/generate-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ echo "Release: $release"
"${root_dir}"/hack/update-codegen.sh
git apply "${root_dir}"/openshift/patches/018-rekt-test-override-kopublish.patch
git apply "${root_dir}"/openshift/patches/020-mutemetrics.patch
git apply "${root_dir}"/openshift/patches/027-chmod-codegen.patch

./openshift/generate.sh

Expand Down
4 changes: 2 additions & 2 deletions vendor/knative.dev/hack/codegen-library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ export GOBIN=${GOPATH}/bin # Set GOBIN explicitly as deepcopy-gen is installed b
export CODEGEN_PKG=${CODEGEN_PKG:-$(cd ${REPO_ROOT_DIR}; ls -d -1 ./vendor/k8s.io/code-generator 2>/dev/null || echo ../code-generator)}
export KNATIVE_CODEGEN_PKG=${KNATIVE_CODEGEN_PKG:-$(cd ${REPO_ROOT_DIR}; ls -d -1 ./vendor/knative.dev/pkg 2>/dev/null || echo "${REPO_ROOT_DIR}")}

chmod +x ${CODEGEN_PKG}/generate-groups.sh
chmod +x ${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh
[ -x ${CODEGEN_PKG}/generate-groups.sh ] || chmod +x ${CODEGEN_PKG}/generate-groups.sh
[ -x ${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh ] || chmod +x ${KNATIVE_CODEGEN_PKG}/hack/generate-knative.sh

0 comments on commit 31b2733

Please sign in to comment.