Skip to content

Commit

Permalink
maint: fix version check in install script
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Dolitsky <josh@dolit.ski>
jdolitsky committed Feb 4, 2021
1 parent 3a24659 commit 543ffa5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/get-chartmuseum
Original file line number Diff line number Diff line change
@@ -119,7 +119,10 @@ checkDesiredVersion() {
# if it needs to be changed.
checkChartmuseumInstalledVersion() {
if [[ -f "${CHARTMUSEUM_INSTALL_DIR}/${BINARY_NAME}" ]]; then
local version=v$("${CHARTMUSEUM_INSTALL_DIR}/${BINARY_NAME}" version | awk '{print $3}')
local version=$("${CHARTMUSEUM_INSTALL_DIR}/${BINARY_NAME}" --version | awk '{print $3}')
if [[ ! "${version}" =~ ^v.* ]]; then
version="v${version}" # fix for older versions
fi
if [[ "$version" == "$TAG" ]]; then
echo "ChartMuseum ${version} is already ${DESIRED_VERSION:-latest}"
return 0

0 comments on commit 543ffa5

Please sign in to comment.