update release script

This commit is contained in:
Carson McManus 2023-07-02 07:39:46 -04:00
parent 3146d4824c
commit 6f4064ff58

View file

@ -87,20 +87,22 @@ cross build --release "--target=$BUILD_TARGET"
BIN_PATH="target/$BUILD_TARGET/release/steamguard" BIN_PATH="target/$BUILD_TARGET/release/steamguard"
BIN_PATH2="target/$BUILD_TARGET2/release/steamguard.exe" BIN_PATH2="target/$BUILD_TARGET2/release/steamguard.exe"
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 # TODO: can't compare with the tag anymore because it doesn't exist yet. maybe get a better condition?
echo "Version mismatch: $RAW_VERSION != $TAGGED_VERSION" # TAGGED_VERSION="$(git tag | grep "^v" | tail -n 1 | tr -d v)"
if [[ $DRY_RUN == false ]]; then # if [[ "v$RAW_VERSION" != "v$TAGGED_VERSION" ]]; then
echo "Aborting." # echo "Version mismatch: $RAW_VERSION != $TAGGED_VERSION"
exit 2 # if [[ $DRY_RUN == false ]]; then
fi # echo "Aborting."
fi # exit 2
# fi
# fi
VERSION="v$RAW_VERSION" VERSION="v$RAW_VERSION"
echo "It's now safe to push tags and publish for the affected crates." echo "It's now safe to push tags and publish for the affected crates."
if [[ $DRY_RUN == false ]]; then if [[ $DRY_RUN == false ]]; then
cargo smart-release --update-crates-index --no-changelog cargo smart-release --update-crates-index --no-changelog --execute
fi fi
if [[ $DRY_RUN == false ]]; then if [[ $DRY_RUN == false ]]; then