-
Notifications
You must be signed in to change notification settings - Fork 480
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: make sure installed chartsnap version matches desired
- Loading branch information
Showing
2 changed files
with
16 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
CHARTSNAP_VERSION="0.3.1" | ||
|
||
# Only install the plugin if it is not already installed or if the version is different. | ||
if [[ $(helm plugin list | grep chartsnap | grep -Eo '[0-9]{1,}.[0-9]{1,}.[0-9]{1,}') == "${CHARTSNAP_VERSION}" ]]; then | ||
echo "INFO: chartsnap plugin is already installed and up to date" | ||
else | ||
echo "INFO: Installing chartsnap plugin" | ||
if [ $(helm plugin list | grep -ic chartsnap) -eq 1 ]; then | ||
echo "INFO: Uninstalling existing chartsnap plugin - version mismatch" | ||
helm plugin uninstall chartsnap | ||
fi | ||
helm plugin install https://github.com/jlandowner/helm-chartsnap --version "${CHARTSNAP_VERSION}" | ||
fi |