File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -38,11 +38,14 @@ function parse_inputs {
3838
3939function install_kustomize {
4040
41- # hack to support older version
42- url=$( curl -s " https://api.github.com/repos/kubernetes-sigs/kustomize/releases?per_page=100&page=1" | jq -r ' .[].assets[] | select(.browser_download_url | test("kustomize(_|.)?(v)?' $kustomize_version ' _linux_amd64")) | .browser_download_url' )
43- if [ -z " ${url} " ]; then
44- url=$( curl -s " https://api.github.com/repos/kubernetes-sigs/kustomize/releases?per_page=100&page=2" | jq -r ' .[].assets[] | select(.browser_download_url | test("kustomize(_|.)?(v)?' $kustomize_version ' _linux_amd64")) | .browser_download_url' )
45- fi
41+ echo " getting download url for kustomize ${kustomize_version} "
42+ for i in {1..100}; do
43+ url=$( curl -s " https://api.github.com/repos/kubernetes-sigs/kustomize/releases?per_page=100&page=$i " | jq -r ' .[].assets[] | select(.browser_download_url | test("kustomize(_|.)?(v)?' $kustomize_version ' _linux_amd64")) | .browser_download_url' )
44+ if [ ! -z $url ]; then
45+ echo " Download URL found in $url "
46+ break
47+ fi
48+ done
4649
4750 echo " Downloading kustomize v${kustomize_version} "
4851 if [[ " ${url} " =~ .tar.gz$ ]]; then
You can’t perform that action at this time.
0 commit comments