From cde41265f4517e7dd775a4ad1e3b8a64d7ec77ba Mon Sep 17 00:00:00 2001 From: Marcin Date: Tue, 11 Jun 2024 18:11:26 -0700 Subject: [PATCH] update tag script --- src/bin/build-scripts/tag.patch.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/bin/build-scripts/tag.patch.sh b/src/bin/build-scripts/tag.patch.sh index 0b30272..90c55a0 100755 --- a/src/bin/build-scripts/tag.patch.sh +++ b/src/bin/build-scripts/tag.patch.sh @@ -1,6 +1,6 @@ #!/bin/bash -git fetch --tags +git fetch --tags --force latestTag=$(git tag | grep v | sort -V | tail -n 1) # Split the version into major, minor, patch @@ -29,8 +29,14 @@ patch=$((patch + 1)) # Assemble the new version newTag="$major.$minor.$patch" -echo "New Tag: $newTag" +echo "New Version ($major.$minor.$patch) -> ($newTag)" -# # Create a new tag -# git tag $newTag -# git push origin $newTag +read -p "Verify new version: " inputTag + +if [ "$inputTag" != "$newTag" ]; then + echo "Incorrect tag entered. Exiting..." + exit 1 +fi + +git tag $newTag +git push origin $newTag