Skip to content

Commit 11e25b3

Browse files
committed
Add script for tagging
1 parent dd6f886 commit 11e25b3

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

scripts/tag.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
TAG="$1"
6+
7+
if [ -z "$TAG" ]
8+
then
9+
echo "$0 [tag]" >&2
10+
exit 1
11+
fi
12+
13+
echo "Do you want to tag the current state of cosmic-epoch with the tag $TAG? (y/N)"
14+
read answer
15+
if [ "$answer" != "y" ]
16+
then
17+
echo "Did not answer y, exiting" >&2
18+
exit 1
19+
fi
20+
21+
set -x
22+
23+
git fetch --recurse-submodules
24+
25+
git tag --force "$TAG"
26+
git submodule foreach git tag --force "$TAG"
27+
28+
git push --force origin tag "$TAG"
29+
git submodule foreach git push --force origin tag "$TAG"

0 commit comments

Comments
 (0)