Skip to content

Commit

Permalink
Adding tag.sh script to add new version tags
Browse files Browse the repository at this point in the history
  • Loading branch information
galal-hussein authored and brandond committed May 17, 2024
1 parent c93c695 commit a455a25
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
set -e

if [ -z "$1" ]; then
echo usage: $0 TAG
exit 1
fi

if [ -n "$(git tag -l $1)" ]; then
echo $1 tag exists run
echo " " git tag -d $1
exit 1
fi

git tag $1
TAGS="refs/tags/$1"

git tag client/${1/v3./v2.30}
TAGS="$TAGS client/${1/v3./v2.30}"

for i in */; do
if [ -f $i/go.mod ]; then
git tag -d $i$1 2>/dev/null || true
git tag $i$1
TAGS="$TAGS refs/tags/$i$1"
fi
done

echo git push '$REMOTE' "$TAGS"

0 comments on commit a455a25

Please sign in to comment.