Skip to content

Commit e29f881

Browse files
authored
chore: add retag script (#146)
* chore: add rettag script * rename * docs * spell
1 parent 3ab53d9 commit e29f881

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

.github/cspell.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"mostrado",
3434
"página",
3535
"Texto",
36-
"creatordate"
36+
"creatordate",
37+
"retag"
3738
]
3839
}

tool/retag_v1.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
# Updates the "v1" tag to point to a newer release.
4+
# To be executed whenever a new 1.x tag is created.
5+
# Usage: ./retag_v1.sh <newer-existing-version>
6+
7+
currentBranch=$(git symbolic-ref --short -q HEAD)
8+
if [[ ! $currentBranch == "main" ]]; then
9+
echo "Re-tagging is only supported on the main branch."
10+
exit 1
11+
fi
12+
13+
# Get new version
14+
new_version="$1";
15+
16+
if [[ "$new_version" == "" ]]; then
17+
echo "No new version supplied, please provide one"
18+
exit 1
19+
fi
20+
21+
git tag -d v1 && git tag v1 v$new_version && git push origin --delete v1 && git push origin v1

0 commit comments

Comments
 (0)