add version match check

This commit is contained in:
Carson McManus 2021-09-01 08:44:23 -04:00
parent d285a4ba3b
commit 3e0397ace7

View file

@ -64,6 +64,10 @@ cargo smart-release --update-crates-index "${params[@]}"
BIN_PATH="target/release/steamguard-cli" BIN_PATH="target/release/steamguard-cli"
RAW_VERSION="$("$BIN_PATH" --version | cut -d " " -f 2)" RAW_VERSION="$("$BIN_PATH" --version | cut -d " " -f 2)"
TAGGED_VERSION="$(git tag | grep "^v" | tail -n 1 | tr -d v)"
if [[ "v$RAW_VERSION" != "v$TAGGED_VERSION" ]]; then
echo "Version mismatch: $RAW_VERSION != $TAGGED_VERSION"
fi
VERSION="v$RAW_VERSION" VERSION="v$RAW_VERSION"
if [[ $DRY_RUN == false ]]; then if [[ $DRY_RUN == false ]]; then