Skip to content

Commit 4c3913b

Browse files
committed
script
Signed-off-by: Gabriele Santomaggio <[email protected]>
1 parent cb00641 commit 4c3913b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

create_tag.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#/bin/bash
2+
3+
version=$1
4+
gpg_key=$2
5+
regex="^([0-9]+)\.([0-9]+)\.([0-9]+)(-(alpha|beta|rc)\.[0-9]+)?$"
6+
tag="v$version"
7+
8+
if [ $# -lt 2 ]; then
9+
echo "Usage: $0 <version> <gpg_key>"
10+
exit 1
11+
fi
12+
13+
if [[ ! $version =~ $regex ]]; then
14+
echo "Invalid version format: $version"
15+
exit 1
16+
fi
17+
18+
# echo "Updating version and constants to $version"
19+
# echo $version > VERSION
20+
# sed -i -e "s/.*ClientVersion = \"*.*/ClientVersion = \"$version\"/" pkg/stream/constants.go
21+
# go fmt ./...
22+
23+
# echo ""
24+
# echo "Committing changes"
25+
# git add VERSION pkg/stream/constants.go README.md
26+
# git commit -m "rabbitmq-stream-go-client $tag"
27+
28+
echo ""
29+
echo "Creating and pushing tag $tag"
30+
git tag -a -s -u $gpg_key -m "rabbitmq-amqp-go-client $tag" $tag && git push && git push --tags

0 commit comments

Comments
 (0)