Skip to content

Commit

Permalink
fix logs; add update support
Browse files Browse the repository at this point in the history
Signed-off-by: Pranav Singh <pranavsingh02@hotmail.com>
  • Loading branch information
theBeginner86 committed Nov 23, 2024
1 parent 7b229ce commit 331a41a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
7 changes: 1 addition & 6 deletions install-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ if [ "$SKIP_BIN_INSTALL" = "1" ]; then
exit
fi


# initArch discovers the architecture for this system.
initArch() {
ARCH=$(uname -m)
Expand Down Expand Up @@ -66,7 +65,6 @@ verifySupported() {
supported+="${os}-${arch}\n"
done
done
echo "supported: ${supported[@]}"
if ! echo "${supported}" | grep -q "${OS}-${ARCH}"; then
echo "No prebuild binary for ${OS}-${ARCH}."
exit 1
Expand Down Expand Up @@ -98,10 +96,8 @@ downloadFile() {
PLUGIN_TMP_FILE="/tmp/${PROJECT_NAME}.tar.gz"
echo "Downloading $DOWNLOAD_URL"
if type "curl" > /dev/null; then
echo "curl -L $DOWNLOAD_URL -o $PLUGIN_TMP_FILE"
curl -L "$DOWNLOAD_URL" -o "$PLUGIN_TMP_FILE"
elif type "wget" > /dev/null; then
echo "wget -q -O $PLUGIN_TMP_FILE $DOWNLOAD_URL"
wget -q -O "$PLUGIN_TMP_FILE" "$DOWNLOAD_URL"
fi
}
Expand Down Expand Up @@ -143,8 +139,7 @@ getDownloadURL
downloadFile
installFile
echo
echo "helm-kanvas-snapshot is installed."
echo "${HELM_PLUGIN_DIR}/bin/helm-kanvas-snapshot" -h
echo "helm-kanvas-snapshot is installed at ${HELM_PLUGIN_DIR}/bin/helm-kanvas-snapshot"
echo
echo "See https://github.com/$PROJECT_GH#readme for more information on getting started."

3 changes: 1 addition & 2 deletions plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ useTunnel: true
command: "$HELM_PLUGIN_DIR/bin/helm-kanvas-snapshot"
hooks:
install: |
echo "Snapshot plugin installed."
$HELM_PLUGIN_DIR/install-binary.sh
update: |
echo "Snapshot plugin updated."
$HELM_PLUGIN_DIR/install-binary.sh
uninstall: |
echo "Snapshot plugin uninstalled."

0 comments on commit 331a41a

Please sign in to comment.