summaryrefslogtreecommitdiff
path: root/build-aux/do-release-commit-and-tag
diff options
context:
space:
mode:
authorAkim Demaille <akim@lrde.epita.fr>2012-08-01 09:55:49 +0200
committerAkim Demaille <akim@lrde.epita.fr>2012-08-01 11:34:41 +0200
commitbd54a45e6e4bcb3ee7359c9b4f1d831a6291148f (patch)
tree7aefde8d2b0a0e166dc8910ac7e6384019dc849e /build-aux/do-release-commit-and-tag
parentee60576c422f09840dbb331fe06f571c114529e2 (diff)
downloadgnulib-bd54a45e6e4bcb3ee7359c9b4f1d831a6291148f.tar.gz
maint.mk: a "release-commit" wrapper to do-release-commit-and-tag
* build-aux/do-release-commit-and-tag: Move variable definitions together. ($branch): Instead of defaulting to "master", default to the current branch (as gnu-web-doc-update does). (help): Display the current values of the option arguments. * top/maint.mk (release-commit): New. * top/README-release: Simplify the corresponding step.
Diffstat (limited to 'build-aux/do-release-commit-and-tag')
-rwxr-xr-xbuild-aux/do-release-commit-and-tag20
1 files changed, 11 insertions, 9 deletions
diff --git a/build-aux/do-release-commit-and-tag b/build-aux/do-release-commit-and-tag
index 8beca86874..fa89e76db4 100755
--- 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=2012-07-05.15 # UTC
+VERSION=2012-08-01.09 # UTC
# Note: this is a bash script (could be zsh or dash)
@@ -28,9 +28,6 @@ ME=$(basename "$0")
warn() { printf '%s: %s\n' "$ME" "$*" >&2; }
die() { warn "$*"; exit 1; }
-noteworthy='* Noteworthy changes in release'
-noteworthy_stub="$noteworthy ?.? (????-??-??) [?]"
-
help()
{
cat <<EOF
@@ -49,10 +46,10 @@ Requirements:
$noteworthy_stub
Options:
- --branch=BRANCH set release branch (default: master)
- -C, --builddir=DIR location of (configured) Makefile (default: .)
- --help print this help, then exit
- --version print version number, then exit
+ --branch=BRANCH set release branch (default: $branch)
+ -C, --builddir=DIR location of (configured) Makefile (default: $builddir)
+ --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:
@@ -81,7 +78,12 @@ EOF
## Main. ##
## ------ ##
-branch=master
+# Constants.
+noteworthy='* Noteworthy changes in release'
+noteworthy_stub="$noteworthy ?.? (????-??-??) [?]"
+
+# Variables.
+branch=$(git branch | sed -ne '/^\* /{s///;p;q;}')
builddir=.
while test $# != 0