Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle binary incompatibility during upgrade #403

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions global_install_scripts/update_talisman.bash
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,14 @@ function run() {
verify_checksum ${TALISMAN_BINARY_NAME}
}

function verify_binary_is_working() {
chmod +x ${TEMP_DIR}/${TALISMAN_BINARY_NAME}
if ! ${TEMP_DIR}/${TALISMAN_BINARY_NAME} --version; then
echo_error "Binary is not working, SKIPPING UPGRADE, Please open issue on github with your OS name and version"
exit 0
fi
}

function download_talisman_hook_script() {
echo_debug "Running download_talisman_hook_script"
curl --silent https://raw.githubusercontent.com/${INSTALL_ORG_REPO}/master/global_install_scripts/talisman_hook_script.bash >${TEMP_DIR}/talisman_hook_script
Expand Down Expand Up @@ -174,6 +182,7 @@ function run() {
set_talisman_binary_name
echo "Downloading latest talisman binary..."
download_talisman_binary
verify_binary_is_working
setup_talisman
if [ -z "$UPDATE_TYPE" ]; then
echo "Downloading latest talisman hook script..."
Expand Down