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 Mar 29, 2023
1 parent 901feef commit 92862d1
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/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"

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 92862d1

Please sign in to comment.