Skip to content

Commit

Permalink
Use hacks directly
Browse files Browse the repository at this point in the history
  • Loading branch information
cardil committed Feb 14, 2025
1 parent 63f9aa1 commit 1d04e5c
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions openshift/scripts/generate-dockerfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,9 @@ set -o errexit
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}"

return $?
}

repo_root_dir=$(dirname "$(realpath "${BASH_SOURCE[0]}")")/../..

install_generate_hack_tool || exit 1

"$(go env GOPATH)"/bin/generate \
go run github.com/openshift-knative/hack/cmd/generate@latest \
--root-dir "${repo_root_dir}" \
--generators dockerfile \
--dockerfile-image-builder-fmt "registry.ci.openshift.org/openshift/release:rhel-8-release-golang-%s-openshift-4.19" \
Expand Down

0 comments on commit 1d04e5c

Please sign in to comment.