bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: maint.mk: a "release-commit" wrapper to do-release-commit-and-tag


From: Akim Demaille
Subject: Re: maint.mk: a "release-commit" wrapper to do-release-commit-and-tag
Date: Wed, 1 Aug 2012 11:35:26 +0200

Le 1 août 2012 à 10:59, Bruno Haible a écrit :

> Akim Demaille wrote:
>> I used […] for default values, by habit (e.g., ./configure),
>> but I can restore to (default: …) if you prefer.
> 
> This notation […] is not widespread enough, IMO, that people would
> immediately understand it. Especially if the value is just '.':
> 
>  -C, --builddir=DIR   location of (configured) Makefile [.]
> 
> I find this shortened output confusing.

OK.  configure includes a

  Defaults for the options are specified in brackets.

but here is a version with (default: …).  Since we are dangerously
close to 80 columns, I have requisitioned a space between options
and help message.

commit bd54a45e6e4bcb3ee7359c9b4f1d831a6291148f
Author: Akim Demaille <address@hidden>
Date:   Wed Aug 1 09:55:49 2012 +0200

    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.

diff --git a/ChangeLog b/ChangeLog
index 14e5dd4..a5aca2f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-08-01  Akim Demaille  <address@hidden>
+
+       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.
+
 2012-07-30  Eric Blake  <address@hidden>
 
        passfd: fix comment on recvfd
diff --git a/build-aux/do-release-commit-and-tag 
b/build-aux/do-release-commit-and-tag
index 8beca86..fa89e76 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
diff --git a/top/README-release b/top/README-release
index e5f0e4d..9c47528 100644
--- a/top/README-release
+++ b/top/README-release
@@ -31,15 +31,10 @@ Here are most of the steps we (maintainers) follow when 
making a release.
 
     make check syntax-check distcheck
 
-* From top_srcdir, run:
+* To (i) set the date, version number, and release type [stable/alpha/beta]
+  on line 3 of NEWS, (ii) commit that, and (iii) tag the release, run
 
-    build-aux/do-release-commit-and-tag X.Y stable
-
-  in order to (i) set the date, version number, and release type
-  [stable/alpha/beta] on line 3 of NEWS, (ii) commit that, and (iii) tag the
-  release.  See --help if you need options such as:
-
-    build-aux/do-release-commit-and-tag --branch=maint -C _build X.Y.Z stable
+    make release-commit RELEASE='X.Y stable'
 
 * Run the following to create release tarballs.  Your choice selects the
   corresponding upload-to destination in the emitted gnupload command.
diff --git a/top/maint.mk b/top/maint.mk
index 0f36116..bdc4502 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -1294,6 +1294,12 @@ announcement: NEWS ChangeLog $(rel-files)
            --no-print-checksums                                        \
            $(addprefix --url-dir=, $(url_dir_list))
 
+.PHONY: release-commit
+release-commit:
+       $(AM_V_GEN)cd $(srcdir)                         \
+         && $(_build-aux)/do-release-commit-and-tag    \
+              -C $(abs_builddir) $(RELEASE)
+
 ## ---------------- ##
 ## Updating files.  ##
 ## ---------------- ##




reply via email to

[Prev in Thread] Current Thread [Next in Thread]