File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,12 @@ if [ "$SKIP_BIN_INSTALL" = "1" ]; then
30
30
exit
31
31
fi
32
32
33
+ # which mode is the common installer script running in
34
+ SCRIPT_MODE=" install"
35
+ if [ " $1 " = " -u" ]; then
36
+ SCRIPT_MODE=" update"
37
+ fi
38
+
33
39
# initArch discovers the architecture for this system.
34
40
initArch () {
35
41
ARCH=$( uname -m)
@@ -76,7 +82,7 @@ verifySupported() {
76
82
# getDownloadURL checks the latest available version.
77
83
getDownloadURL () {
78
84
version=$( git -C " $HELM_PLUGIN_DIR " describe --tags --exact-match 2> /dev/null || :)
79
- if [ -n " $version " ]; then
85
+ if [ " $SCRIPT_MODE " = " install " -a -n " $version " ]; then
80
86
DOWNLOAD_URL=" https://github.com/$PROJECT_GH /releases/download/$version /helm-diff-$OS -$ARCH .tgz"
81
87
else
82
88
DOWNLOAD_URL=" https://github.com/$PROJECT_GH /releases/latest/download/helm-diff-$OS -$ARCH .tgz"
Original file line number Diff line number Diff line change @@ -8,4 +8,4 @@ useTunnel: true
8
8
command : " $HELM_PLUGIN_DIR/bin/diff"
9
9
hooks :
10
10
install : " $HELM_PLUGIN_DIR/install-binary.sh"
11
- update : " $HELM_PLUGIN_DIR/install-binary.sh"
11
+ update : " $HELM_PLUGIN_DIR/install-binary.sh -u "
You can’t perform that action at this time.
0 commit comments