5
5
PROJECT_NAME=" helm-diff"
6
6
PROJECT_GH=" databus23/$PROJECT_NAME "
7
7
8
- : ${HELM_PLUGIN_PATH := " $( helm home --debug=false) /plugins/helm-diff" }
8
+ : ${HELM_PLUGIN_DIR := " $( helm home --debug=false) /plugins/helm-diff" }
9
9
10
- # Convert the HELM_PLUGIN_PATH to unix if cygpath is
10
+ # Convert the HELM_PLUGIN_DIR to unix if cygpath is
11
11
# available. This is the case when using MSYS2 or Cygwin
12
12
# on Windows where helm returns a Windows path but we
13
13
# need a Unix path
14
14
15
15
if type cygpath > /dev/null 2>&1 ; then
16
- HELM_PLUGIN_PATH =$( cygpath -u $HELM_PLUGIN_PATH )
16
+ HELM_PLUGIN_DIR =$( cygpath -u $HELM_PLUGIN_DIR )
17
17
fi
18
18
19
19
if [[ $SKIP_BIN_INSTALL == " 1" ]]; then
@@ -66,7 +66,7 @@ verifySupported() {
66
66
67
67
# getDownloadURL checks the latest available version.
68
68
getDownloadURL () {
69
- local version=$( git -C $HELM_PLUGIN_PATH describe --tags --exact-match 2> /dev/null)
69
+ local version=$( git -C $HELM_PLUGIN_DIR describe --tags --exact-match 2> /dev/null)
70
70
if [ -n " $version " ]; then
71
71
DOWNLOAD_URL=" https://github.com/$PROJECT_GH /releases/download/$version /helm-diff-$OS .tgz"
72
72
else
@@ -99,9 +99,9 @@ installFile() {
99
99
mkdir -p " $HELM_TMP "
100
100
tar xf " $PLUGIN_TMP_FILE " -C " $HELM_TMP "
101
101
HELM_TMP_BIN=" $HELM_TMP /diff/bin/diff"
102
- echo " Preparing to install into ${HELM_PLUGIN_PATH } "
103
- mkdir -p " $HELM_PLUGIN_PATH /bin"
104
- cp " $HELM_TMP_BIN " " $HELM_PLUGIN_PATH /bin"
102
+ echo " Preparing to install into ${HELM_PLUGIN_DIR } "
103
+ mkdir -p " $HELM_PLUGIN_DIR /bin"
104
+ cp " $HELM_TMP_BIN " " $HELM_PLUGIN_DIR /bin"
105
105
}
106
106
107
107
# fail_trap is executed if an error occurs.
@@ -117,8 +117,8 @@ fail_trap() {
117
117
# testVersion tests the installed client to make sure it is working.
118
118
testVersion () {
119
119
set +e
120
- echo " $PROJECT_NAME installed into $HELM_PLUGIN_PATH /$PROJECT_NAME "
121
- " ${HELM_PLUGIN_PATH } /bin/diff" -h
120
+ echo " $PROJECT_NAME installed into $HELM_PLUGIN_DIR /$PROJECT_NAME "
121
+ " ${HELM_PLUGIN_DIR } /bin/diff" -h
122
122
set -e
123
123
}
124
124
0 commit comments