diff options
author | Cyrill Gorcunov <gorcunov@gmail.com> | 2010-03-03 22:36:22 +0300 |
---|---|---|
committer | Cyrill Gorcunov <gorcunov@gmail.com> | 2010-03-03 22:41:45 +0300 |
commit | 27fb3703a5a9387a9d7e32838cc55c7ee4f4b1b6 (patch) | |
tree | ccfd0f69c64c26268cf9bd8aceb18e43c69015c2 | |
parent | 305b2b43c464451bde8db072bfd73192143f20af (diff) | |
download | nasm-27fb3703a5a9387a9d7e32838cc55c7ee4f4b1b6.tar.gz nasm-27fb3703a5a9387a9d7e32838cc55c7ee4f4b1b6.tar.bz2 nasm-27fb3703a5a9387a9d7e32838cc55c7ee4f4b1b6.zip |
misc/tag-release: Make it usable for remote repos
In case if the commiter has a main repo configured as remote
one and also has various tags (and don't want to push every
tag he has out to the main repo) he may use misc/tag-release
new functionality.
For example I have NASM remote repo as well known
git://repo.or.cz/nasm.git
and a number of my own local tags/branches which I
would like to not sprinkle into a master repo.
So to make a release (say 2.08) I may just type
misc/tag-release 2.08 git+ssh://xxx@repo.or.cz/srv/git/nasm.git master
and this command will push master branch into main repo with "nasm-2.08" tag.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rwxr-xr-x | misc/tag-release | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/misc/tag-release b/misc/tag-release index efaa4c3..230137f 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 |