summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmisc/tag-release25
1 files changed, 21 insertions, 4 deletions
diff --git a/misc/tag-release b/misc/tag-release
index efaa4c32..230137f7 100755
--- a/misc/tag-release
+++ b/misc/tag-release
@@ -1,13 +1,30 @@
#!/bin/sh
+
version="$1"
+repo=""
+branch=""
+
if [ -z "$version" ]; then
- echo "Usage: $0 version" 1>&2
+ echo "Usage: $0 version [repo branch]" 1>&2
exit 1
fi
+tag="nasm-$version"
+
+if [ $# -eq 3 ]; then
+ repo="$2"
+ branch="$3"
+fi
+
echo "$version" > version
git add version
git commit -m "NASM $version"
-git tag -a -m "NASM $version" nasm-"$version"
-git push
-git push --tags
+git tag -a -m "NASM $version" "$tag"
+
+if [ $# -eq 3 ]; then
+ git push "$repo" "$branch"
+ git push "$repo" "$tag"
+else
+ git push
+ git push --tags
+fi