Add np and similar prefixes to instructions that should have them
[nasm.git] / misc / tag-release
blob62e3eba5d6ca26524c8b893d5d7220854ac371a1
1 #!/bin/sh
3 version=""
4 repo=""
5 branch=""
6 push=1
8 for opt in $*
9 do
10 case "$opt" in
11 --ver=*)
12 version=`echo $opt | sed 's/[-a-zA-Z0-9]*=//'`
14 --repo=*)
15 repo=`echo $opt | sed 's/[-a-zA-Z0-9]*=//'`
17 --branch=*)
18 branch=`echo $opt | sed 's/[-a-zA-Z0-9]*=//'`
20 --no-push)
21 push=0
24 version=$opt
26 esac
27 done
29 if [ -z "$version" ]; then
30 echo " Usage"
31 echo " $0 --ver=num [--repo=name --branch=name --push]" 1>&2
32 echo " Example"
33 echo " $0 --ver=2.10rc1 --repo=git+ssh://user@repo.or.cz/nasm.git --branch=master --no-push" 1>&2
34 echo " With --no-push the changes are not pushed out to remote repo"
35 exit 1
38 tag="nasm-$version"
40 echo "$version" > version
41 git add version
42 git commit -m "NASM $version"
43 git tag -a -m "NASM $version" "$tag"
45 if [ $push = 1 ]; then
46 set -x
47 git push $repo $branch
48 git push $repo $tag
49 git push --tags $repo
50 set +x