File tree 1 file changed +12
-7
lines changed
1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -40,21 +40,26 @@ trap cleanup EXIT
40
40
pushd $tmpDir >& /dev/null
41
41
42
42
opsys=windows
43
+ arch=amd64
43
44
if [[ " $OSTYPE " == linux* ]]; then
44
- opsys=linux_amd64
45
+ opsys=linux
45
46
elif [[ " $OSTYPE " == darwin* ]]; then
46
47
opsys=darwin
47
48
fi
48
49
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} | \
52
58
cut -d ' "' -f 4 | \
53
- grep /kustomize/v3.9.4 | \
54
- sort | tail -n 1 | \
59
+ sort -V | tail -n 1 | \
55
60
xargs curl -s -O -L
56
61
57
- tar xzf ./kustomize_v* _${opsys} .tar.gz
62
+ tar xzf ./kustomize_v* _${opsys} _ ${arch} .tar.gz
58
63
59
64
cp ./kustomize $where
60
65
You can’t perform that action at this time.
0 commit comments