Mercurial > hg > octave-lojdl > gnulib-hg
changeset 14684:8acb3380123d
do-release-commit-and-tag: add option to specify branch
* build-aux/do-release-commit-and-tag: Add --branch.
author | Reuben Thomas <rrt@sc3d.org> |
---|---|
date | Wed, 04 May 2011 12:22:12 +0100 |
parents | efab6978105e |
children | f7f11056a86e |
files | ChangeLog build-aux/do-release-commit-and-tag |
diffstat | 2 files changed, 18 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-05-04 Reuben Thomas <rrt@sc3d.org> + + Add option to do-release-commit-and-tag to specify branch. + * build-aux/do-release-commit-and-tag: Add --branch. + 2011-05-03 Bruno Haible <bruno@clisp.org> Avoid unnecessary compilation units, through conditional dependencies.
--- a/build-aux/do-release-commit-and-tag +++ b/build-aux/do-release-commit-and-tag @@ -3,7 +3,7 @@ # controlled .prev-version file, automate the procedure by which we record # the date, release-type and version string in the NEWS file. That commit # will serve to identify the release, so apply a signed tag to it as well. -VERSION=2010-06-07.07 # UTC +VERSION=2011-05-04.11 # UTC # Note: this is a bash script (could be zsh or dash) @@ -32,7 +32,7 @@ { case $1 in --help) cat <<EOF -Usage: $ME VERSION RELEASE_TYPE +Usage: $ME [OPTION...] VERSION RELEASE_TYPE Run this script to perform the final pre-release NEWS update in which the date, release-type and version string are recorded. @@ -46,8 +46,9 @@ - a version-controlled .prev-version file Options: - --help print this help, then exit - --version print version number, then exit + --branch BRANCH set release branch (default: master) + --help print this help, then exit + --version print version number, then exit EXAMPLE: To update NEWS and tag the beta 8.1 release of coreutils, I would run this: @@ -73,10 +74,15 @@ esac } +branch=master +case $1 in + --branch) shift; branch=$1; shift ;; +esac + case $# in 1) help_version $1; exit 0;; 2) ;; - *) warn "Usage: $ME VERSION TYPE"; exit 1;; + *) warn "Usage: $ME [OPTION...] VERSION TYPE"; exit 1;; esac ver=$1 @@ -121,9 +127,9 @@ -e 'print $.==3 ? "$pfx $ver ($today) [$type]\n" : $_' \ NEWS || die 'failed to update NEWS' -# Ensure the current branch name is "master": +# Ensure the current branch name is correct: curr_br=$(git rev-parse --symbolic-full-name HEAD) -test "$curr_br" = refs/heads/master || die not on master +test "$curr_br" = refs/heads/$branch || die not on branch $branch printf "version $ver\n\n* NEWS: Record release date.\n" \ | git commit -F - -a || die 'git commit failed'