Skip to content

Commit

Permalink
fix crd update script (istio#20681)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayj authored Jan 30, 2020
1 parent 37f5e31 commit 34837d7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bin/update_crds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ if [ -z "${SHA}" ]; then
fail "Unable to retrieve the commit SHA of istio/api from go.mod file. Not updating the CRD file. Please make sure istio/api exists in the Go module.";
fi

mkdir -p "${API_TMP}"
cd "${API_TMP}"
git init -q && git fetch "https://github.com/istio/api" -q && git merge "${SHA}" -q
git clone "https://github.com/istio/api" "${API_TMP}" && cd "${API_TMP}"
git checkout "${SHA}"
if [ ! -f "${API_TMP}/kubernetes/customresourcedefinitions.gen.yaml" ]; then
echo "Generated Custom Resource Definitions file does not exist in the commit SHA. Not updating the CRD file."
exit
Expand All @@ -48,4 +47,4 @@ cp "${API_TMP}/kubernetes/customresourcedefinitions.gen.yaml" "${ROOTDIR}/instal
cp "${API_TMP}/kubernetes/customresourcedefinitions.gen.yaml" "${ROOTDIR}/manifests/base/files/crd-all.gen.yaml"

# update the golden files for operator tests
(cd "${ROOTDIR}/operator" && UPDATE_GOLDENS=true go test ./cmd/mesh/...)
(cd "${ROOTDIR}/operator" && UPDATE_GOLDENS=true go test ./cmd/mesh/...)

0 comments on commit 34837d7

Please sign in to comment.