We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c2f71c commit 5b3b254Copy full SHA for 5b3b254
script/release
@@ -0,0 +1,30 @@
1
+#!/bin/bash
2
+
3
+# Usage:
4
+# script/release
5
6
+# COLORS
7
+OFF='\033[0m'
8
+RED='\033[0;31m'
9
+GREEN='\033[0;32m'
10
+BLUE='\033[0;34m'
11
12
+latest_tag=$(git describe --tags $(git rev-list --tags --max-count=1))
13
+echo -e "The latest release tag is: ${BLUE}${latest_tag}${OFF}"
14
+read -p 'New Release Tag (vX.X.X format): ' new_tag
15
16
+tag_regex='^v\d\.\d\.\d$'
17
+echo "$new_tag" | grep -P -q $tag_regex
18
19
+if [[ $? -ne 0 ]]; then
20
+ echo "Tag: $new_tag is valid"
21
+fi
22
23
+git tag -a $new_tag -m "$new_tag Release"
24
25
+echo -e "${GREEN}OK${OFF} - Tagged: $new_tag"
26
27
+git push --tags
28
29
+echo -e "${GREEN}OK${OFF} - Tags pushed to remote!"
30
+echo -e "${GREEN}DONE${OFF}"
0 commit comments