From ea0ab1c8218f28957b6e20dd84f9d2a3f19313e6 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Mon, 3 Jul 2017 07:19:07 +0100 Subject: [PATCH] Simplify running of release.pl --setver. Previously, it demanded that your checkout was in a state where you had run autoconf but not configure; so if you previously did have a Makefile then you had to 'make distclean' to remove it, whereas if you previously had no generated files at all (e.g. starting from a completely clean checkout) then you had to run mkfiles.pl and mkauto.sh to generate 'configure'. This is obviously confusing, and moreover, the dependence on prior generated files is fragile and prone to them having been generated wrong. Adjusted the script so that it uses 'git archive' to get a clean directory containing only the version-controlled files, and then runs scripts itself to get that directory into the state it wants. --- CHECKLST.txt | 1 - release.pl | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHECKLST.txt b/CHECKLST.txt index 8d55ac41..f757c5e0 100644 --- a/CHECKLST.txt +++ b/CHECKLST.txt @@ -52,7 +52,6 @@ for it: - Now update the version numbers and the transcripts in the docs, by checking out the release branch and running - make distclean ./release.pl --version=X.YZ --setver Then check that the resulting automated git commit has updated the diff --git a/release.pl b/release.pl index cf73d9eb..7c76c6ae 100755 --- a/release.pl +++ b/release.pl @@ -31,8 +31,11 @@ if ($setver) { 0 == system "git", "diff-files", "--quiet" or die "working tree is dirty"; -f "Makefile" and die "run 'make distclean' first"; my $builddir = tempdir(DIR => ".", CLEANUP => 1); - 0 == system "./mkfiles.pl" or die; - 0 == system "cd $builddir && ../configure" or die; + 0 == system "git archive --format=tar HEAD | ( cd $builddir && tar xf - )" + or die; + 0 == system "cd $builddir && ./mkfiles.pl" or die; + 0 == system "cd $builddir && ./mkauto.sh" or die; + 0 == system "cd $builddir && ./configure" or die; 0 == system "cd $builddir && make pscp plink RELEASE=${version}" or die; our $pscp_transcript = `cd $builddir && ./pscp --help`; $pscp_transcript =~ s/^Unidentified build/Release ${version}/m or die;