Skip to content

Commit

Permalink
Force GEN_COMMIT
Browse files Browse the repository at this point in the history
  • Loading branch information
Silas Boyd-Wickizer committed Aug 19, 2019
1 parent 780e9b7 commit 1d89fcd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions generate-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ set -o pipefail
. settings

if [[ -z ${GEN_ROOT:-} ]]; then
: "${GEN_COMMIT?Need to set GEN_COMMIT to kubernetes-client/gen commit}"
TEMP_FOLDER=$(mktemp -d)
trap "rm -rf ${TEMP_FOLDER}" EXIT SIGINT

GEN_ROOT="${TEMP_FOLDER}/gen"
echo ">>> Cloning gen repo"
git clone --recursive https://github.com/kubernetes-client/gen.git "${GEN_ROOT}"
if [[ ! -z ${GEN_COMMIT:-} ]]; then
(cd ${GEN_ROOT} && git checkout ${GEN_COMMIT})
fi
(cd ${GEN_ROOT} && git checkout ${GEN_COMMIT})
else
echo ">>> Reusing gen repo at ${GEN_ROOT}"
fi
Expand Down

0 comments on commit 1d89fcd

Please sign in to comment.