File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,6 +115,7 @@ function downloadFromGithub {
115115 TARGET=$6
116116
117117 ARCH=" $( uname -m | sed -e ' s/x86_64/amd64/' -e ' s/\(arm\)\(64\)\?.*/\1\2/' -e ' s/aarch64$/arm64/' ) "
118- PACKAGE=" ${PACKAGE_PREFIX}${ARCH} .${PACKAGE_SUFFIX} "
119- execHandle " Downloading ${USER} /${REPO} @${VERSION} " curl -f -s -L " https://github.com/${USER} /${REPO} /releases/${VERSION} /download/${PACKAGE} " --output " ${TARGET} "
118+ PACKAGE=" ${PACKAGE_PREFIX}${ARCH}${PACKAGE_SUFFIX} "
119+
120+ execHandle " Downloading ${USER} /${REPO} @${VERSION} " curl -f -s -L " https://github.com/${USER} /${REPO} /releases/download/${VERSION} /${PACKAGE} " --output " ${TARGET} "
120121}
Original file line number Diff line number Diff line change 11# Setup required environment for test
2- export EXAMPLE_ENVIRONMENT=something
2+ EXAMPLE_ENVIRONMENT = something
Original file line number Diff line number Diff line change 1010TEMPDIR=$( mktemp -d)
1111cd " ${TEMPDIR} " || exit
1212
13- downloadFromGithub derailed k9s " ${K9S_VERSION} " k9s_Linux_ tar.gz k9s.tar.gz
13+ downloadFromGithub derailed k9s " ${K9S_VERSION} " k9s_Linux_ . tar.gz k9s.tar.gz
1414
1515execHandle " Unpacking k9s" tar xzf k9s.tar.gz
1616execHandle " Installing k9s" mv k9s /home/cloudcontrol/bin
Original file line number Diff line number Diff line change 1+ icon : " ⎔"
2+
3+ title : " Tanzu CLI"
4+
5+ description : " Installs the [Tanzu CLI](https://github.com/vmware-tanzu/tanzu-cli)"
6+
7+ configuration :
8+ - |
9+ Environment TANZU_CLI_VERSION: Tanzu CLI version to install (required)
Original file line number Diff line number Diff line change 1+ TANZUCLI_VERSION = 1.4.0
Original file line number Diff line number Diff line change 1+ command :
2+ test :
3+ exec : " /home/cloudcontrol/bin/tanzu-cli version"
4+ stdout :
5+ - " version: v1.4.0"
6+ exit-status : 0
Original file line number Diff line number Diff line change 1+ . /feature-installer-utils.sh
2+
3+ if [ -n " ${TANZUCLI_VERSION} " ]
4+ then
5+ prepare
6+ VERSION=$( checkAndCleanVersion " ${TANZUCLI_VERSION} " )
7+ SUFFIX=" .tar.gz"
8+ if [ " $( getPlatform) " = " arm64" ]
9+ then
10+ SUFFIX=" -unstable.tar.gz"
11+ fi
12+ downloadFromGithub vmware-tanzu tanzu-cli " v${VERSION} " tanzu-cli-linux- " ${SUFFIX} " tanzu-cli-linux.tar.gz
13+ execHandle " Extracting tanzu cli" tar xzf tanzu-cli-linux.tar.gz
14+ execHandle " Installing tanzu cli" mv " ${VERSION} " /tanzu-cli* " ${BINPATH} /tanzu-cli"
15+ execHandle " Making tanzu cli executable" chmod +x " ${BINPATH} /tanzu-cli"
16+ cleanup
17+ else
18+ echo " The tanzucli feature requires a version set using TANZUCLI_VERSION. See https://github.com/vmware-tanzu/tanzu-cli/releases for valid versions"
19+ exit 1
20+ fi
You can’t perform that action at this time.
0 commit comments