Skip to content

Commit

Permalink
Install hack/generate directly
Browse files Browse the repository at this point in the history
  • Loading branch information
creydr committed Oct 2, 2024
1 parent 9c86c1d commit 21f48ce
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions openshift/scripts/generate-dockerfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@ set -o nounset
set -o pipefail

function install_generate_hack_tool() {
local tmp_dir
tmp_dir="$(mktemp -d)"

git clone --branch main --depth 1 https://github.com/openshift-knative/hack.git "${tmp_dir}"
cd "${tmp_dir}" && \
go install github.com/openshift-knative/hack/cmd/generate && \
cd - && rm -rf "${tmp_dir}"
GOFLAGS='' go install github.com/openshift-knative/hack/cmd/generate@latest

return $?
}
Expand All @@ -26,10 +20,6 @@ install_generate_hack_tool || exit 1
"$(go env GOPATH)"/bin/generate \
--root-dir "${repo_root_dir}" \
--generators dockerfile \
--dockerfile-image-builder-fmt "registry.ci.openshift.org/openshift/release:rhel-9-release-golang-%s-openshift-4.17" \
--dockerfile-image-builder-fmt "registry.ci.openshift.org/openshift/release:rhel-8-release-golang-%s-openshift-4.17" \
--includes cmd/func-util \
--additional-packages socat \
--additional-packages tar \
--sym-link-names /usr/local/bin/deploy \
--sym-link-names /usr/local/bin/scaffold \
--sym-link-names /usr/local/bin/s2i
--template-name "func-util"

0 comments on commit 21f48ce

Please sign in to comment.