Skip to content

Commit

Permalink
Grep-ing on more specific location string to fix auto-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
harinee committed Aug 11, 2020
1 parent b821169 commit 8209cab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion global_install_scripts/talisman_hook_script.bash
Expand Up @@ -47,7 +47,7 @@ esac

function check_and_upgrade_talisman_binary() {
if [ -n "${TALISMAN_HOME:-}" ]; then
LATEST_VERSION=$(curl -Is https://github.com/${ORG_REPO}/releases/latest | grep -E "Location" | grep -o '[^/]\+$' | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')
LATEST_VERSION=$(curl -Is https://github.com/${ORG_REPO}/releases/latest | grep -iE "^location:" | grep -o '[^/]\+$' | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')
CURRENT_VERSION=$(${TALISMAN_BINARY} --version | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+')
if [ ! -z "$LATEST_VERSION" ] && [ "$LATEST_VERSION" != "$CURRENT_VERSION" ]; then
echo ""
Expand Down

0 comments on commit 8209cab

Please sign in to comment.