From 4cc4d2370c5d2441822b2421a87e69129be76eb0 Mon Sep 17 00:00:00 2001 From: Carson McManus Date: Fri, 30 Jun 2023 10:58:30 -0400 Subject: [PATCH] update release script --- scripts/full-release.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/full-release.sh b/scripts/full-release.sh index d20801e..c071b21 100755 --- a/scripts/full-release.sh +++ b/scripts/full-release.sh @@ -66,7 +66,7 @@ fi if [[ $SKIP_CRATE_PUBLISH == true ]]; then params+=(--no-publish) fi -cargo smart-release --update-crates-index --no-changelog --no-publish "${params[@]}" +cargo smart-release --update-crates-index --no-changelog --no-push --no-publish "${params[@]}" #echo "Verify that the publish succeeded, and Press any key to continue..." # read -n 1 -s -r @@ -90,14 +90,22 @@ 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" + if [[ $DRY_RUN == false ]]; then + echo "Aborting." + exit 2 + fi fi VERSION="v$RAW_VERSION" +echo "It's now safe to push tags and publish for the affected crates." + +if [[ $DRY_RUN == false ]]; then + cargo smart-release --update-crates-index --no-changelog +fi + if [[ $DRY_RUN == false ]]; then if [[ $(gh release list | grep -i "Draft" | grep -i "$VERSION" && echo "true" || echo "false") == "true" ]]; then gh release delete --yes "$VERSION" fi gh release create "$VERSION" --title "$VERSION" --draft "$BIN_PATH" "$BIN_PATH2" "./steamguard-cli_$RAW_VERSION-0.deb" fi - -echo "It's now safe to run cargo publish for the affected crates."