diff options
author | Simon Tatham <anakin@pobox.com> | 2017-07-03 09:19:07 +0300 |
---|---|---|
committer | Simon Tatham <anakin@pobox.com> | 2017-07-03 09:28:45 +0300 |
commit | ea0ab1c8218f28957b6e20dd84f9d2a3f19313e6 (patch) | |
tree | 20e9e48cc49fdd4e78b090d3082c0756cf698d4a /release.pl | |
parent | 4624115b76903b0b9ad97bee713afafcbd70a31c (diff) |
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.
Diffstat (limited to 'release.pl')
-rwxr-xr-x | release.pl | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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; |