Skip to content

Commit

Permalink
chore: add retag script (#146)
Browse files Browse the repository at this point in the history
* chore: add rettag script

* rename

* docs

* spell
  • Loading branch information
renancaraujo authored Oct 4, 2023
1 parent 3ab53d9 commit e29f881
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"mostrado",
"página",
"Texto",
"creatordate"
"creatordate",
"retag"
]
}
21 changes: 21 additions & 0 deletions tool/retag_v1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# Updates the "v1" tag to point to a newer release.
# To be executed whenever a new 1.x tag is created.
# Usage: ./retag_v1.sh <newer-existing-version>

currentBranch=$(git symbolic-ref --short -q HEAD)
if [[ ! $currentBranch == "main" ]]; then
echo "Re-tagging is only supported on the main branch."
exit 1
fi

# Get new version
new_version="$1";

if [[ "$new_version" == "" ]]; then
echo "No new version supplied, please provide one"
exit 1
fi

git tag -d v1 && git tag v1 v$new_version && git push origin --delete v1 && git push origin v1

0 comments on commit e29f881

Please sign in to comment.