kubectl version should include bundled kustomize version

This commit is contained in:
Katrina Verey
2022-03-23 19:17:29 -04:00
parent af059a0731
commit 44e63e8ff8
3 changed files with 60 additions and 17 deletions

View File

@@ -55,10 +55,20 @@ fi
./hack/update-internal-modules.sh
./hack/lint-dependencies.sh
sed -i '' -e "s/const kustomizeVersion.*$/const kustomizeVersion = \"${LATEST_KUSTOMIZE}\"/" staging/src/k8s.io/kubectl/pkg/cmd/version/version.go
echo -e "\n${color_blue}Committing changes${color_norm}"
git add .
git commit -a -m "Update kubectl kustomize to kyaml/$LATEST_KYAML, cmd/config/$LATEST_CONFIG, api/$LATEST_API, kustomize/$LATEST_KUSTOMIZE"
echo -e "\n${color_blue:?}Verifying kubectl kustomize version${color_norm:?}"
make WHAT=cmd/kubectl
if [[ $(_output/bin/kubectl version --client -o json | jq -r '.kustomizeVersion') != "$LATEST_KUSTOMIZE" ]]; then
echo -e "${color_red:?}Unexpected kubectl kustomize version${color_norm:?}"
exit 1
fi
echo -e "\n${color_green:?}Update successful${color_norm:?}"
echo "Note: If any of the integration points changed, you may need to update them manually."
echo "See https://github.com/kubernetes-sigs/kustomize/tree/master/releasing#update-kustomize-in-kubectl for more information"