From e647c53af1f5c3265593ddc909c745192347a442 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Tue, 25 Jun 2019 20:04:11 +0100 Subject: [PATCH] Add some polish to the release process --- doc/HOWTO-RELEASE | 40 ++++++++++++++++++++++------------------ tools/get-version | 14 ++++++++++++++ 2 files changed, 36 insertions(+), 18 deletions(-) create mode 100755 tools/get-version diff --git a/doc/HOWTO-RELEASE b/doc/HOWTO-RELEASE index 0c55b0e..a5dd55f 100644 --- a/doc/HOWTO-RELEASE +++ b/doc/HOWTO-RELEASE @@ -11,22 +11,22 @@ First read the official information for maintainers of GNU software: Release procedure ----------------- -- Set a shell variable to the version to be released, e.g. if the - final step of this document was carried out after the previous - release was published: - - version=$( git describe --match v* --abbrev=0 ) - -- Ensure NEWS contains the latest changes, and that any new - contributors have been added to THANKS. - -- git commit -m "Prepare NEWS and THANKS for $version release" - -- Ensure configure.ac contains the new version number. - This should follow Semantic Versioning as described at: +- Ensure configure.ac contains the number of the new unreleased + version. This should follow Semantic Versioning as described at: http://semver.org/ +- To make the following steps easier, set the $version shell variable + to the same version number as above, e.g. + + version=$( tools/get-version ) && echo $version + +- Ensure NEWS contains the latest changes, and that any new + contributors have been added to THANKS. If necessary, commit + any additions: + + git commit -m "Prepare NEWS and THANKS for $version release" + - Check CPAN distribution will work via Module::Build: - Generate stow, chkstow, and lib/Stow.pm via: @@ -51,22 +51,26 @@ Release procedure carried out after the previous release was published, but if not: - git commit -m "Bump version to X.Y.Z" + git commit -m "Bump version to $version" - Ensure all changes are committed to git. - Run make distcheck and ensure that everything looks good. It should generate the distribution files for you. -- Tag the current git HEAD with the new version number: - - git tag -s $version -m "Release $version" - - Run the tests on various Perl versions via Docker: ./build-docker.sh ./test-docker.sh + Obviously if there are any failures, they will need to be fixed + first, and then repeat the above steps. + +- At this point we have a release candidate. Tag the current git HEAD + with the new version number: + + git tag -s $version -m "Release $version" + - Run ./Build dist - Upload the resulting Stow-v7.8.9.tar.gz to CPAN via https://pause.perl.org/ diff --git a/tools/get-version b/tools/get-version new file mode 100755 index 0000000..90d6a1b --- /dev/null +++ b/tools/get-version @@ -0,0 +1,14 @@ +#!/usr/bin/perl -w + +use strict; + +open(CONF, "configure.ac") or die "Couldn't open configure.ac: $!\n"; + +while () { + if (/^AC_INIT\(\[stow\], \[(.+?)\]/) { + print "$1\n"; + exit 0; + } +} + +exit 1;