Skip to content

Commit 568f38c

Browse files
author
ajohns
committed
minor util script update
1 parent 1734c0f commit 568f38c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tag.sh

100644100755
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,25 @@
22
#
33
# Tag git repo with current version as defined in source.
44
#
5+
push=
6+
7+
while getopts p opt
8+
do
9+
case $opt in
10+
p) push=1;;
11+
?) printf "Usage: %s: [-p]\n" $0
12+
exit 2;;
13+
esac
14+
done
15+
516
version=$(cat src/rez/utils/_version.py | grep -w _rez_version | head -n1 | tr '"' ' ' | awk '{print $NF}')
617
echo "tagging ${version}..."
718
git tag $version
819
if [ $? -ne 0 ]; then
920
exit 1
1021
fi
22+
23+
if [ ! -z "$push" ]; then
24+
echo "pushing tags..."
25+
git push --tags
26+
fi

0 commit comments

Comments
 (0)