File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -40,21 +40,26 @@ trap cleanup EXIT
4040pushd $tmpDir >& /dev/null
4141
4242opsys=windows
43+ arch=amd64
4344if [[ " $OSTYPE " == linux* ]]; then
44- opsys=linux_amd64
45+ opsys=linux
4546elif [[ " $OSTYPE " == darwin* ]]; then
4647 opsys=darwin
4748fi
4849
49- curl -s https://api.github.com/repos/kubernetes-sigs/kustomize/releases | \
50- grep browser_download | \
51- grep $opsys | \
50+ # As github has a limit on what stored in releases/, and kustomize has many different package
51+ # versions, we just point directly at the version we want. See
52+ # github.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh.
53+
54+ version=v3.9.4
55+ url_base=https://api.github.com/repos/kubernetes-sigs/kustomize/releases/tags/kustomize%2F
56+ curl -s ${url_base}${version} | \
57+ grep browser_download.* ${opsys} _${arch} | \
5258 cut -d ' "' -f 4 | \
53- grep /kustomize/v3.9.4 | \
54- sort | tail -n 1 | \
59+ sort -V | tail -n 1 | \
5560 xargs curl -s -O -L
5661
57- tar xzf ./kustomize_v* _${opsys} .tar.gz
62+ tar xzf ./kustomize_v* _${opsys} _ ${arch} .tar.gz
5863
5964cp ./kustomize $where
6065
You can’t perform that action at this time.
0 commit comments