[openssl-commits] [tools] master update
Richard Levitte
levitte at openssl.org
Wed Jun 20 15:04:02 UTC 2018
The branch master has been updated
via 897f0887b4fecf22e522c248800b158c2e6a7422 (commit)
via 7ab7e43a50c400c49bf3e0608a1d292e62d020f9 (commit)
from ddda55afb15458bc21187ef80397134193a8982e (commit)
- Log -----------------------------------------------------------------
commit 897f0887b4fecf22e522c248800b158c2e6a7422
Author: Richard Levitte <levitte at openssl.org>
Date: Tue May 29 15:20:11 2018 +0200
do-release.pl: Move old dist files before copying the new ones
Also, extend the patterns we glob for to include pre-releases
Fixes #17
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18)
commit 7ab7e43a50c400c49bf3e0608a1d292e62d020f9
Author: Richard Levitte <levitte at openssl.org>
Date: Tue May 29 15:07:11 2018 +0200
do-release.pl: make sure pre-releases contribute to the array of series
Reviewed-by: Rich Salz <rsalz at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18)
-----------------------------------------------------------------------
Summary of changes:
release-tools/do-release.pl | 45 +++++++++++++++++++++++++--------------------
1 file changed, 25 insertions(+), 20 deletions(-)
diff --git a/release-tools/do-release.pl b/release-tools/do-release.pl
index 1725055..9bc7137 100644
--- a/release-tools/do-release.pl
+++ b/release-tools/do-release.pl
@@ -9,6 +9,8 @@
use strict;
use warnings;
+use File::Basename;
+
my $homedir = glob("~openssl");
my $tmpdir = $ENV{"OPENSSL_TMP_DIR"} // $homedir . "/dist/new";
my $olddir = $ENV{"OPENSSL_OLD_DIR"} // $homedir . "/dist/old";
@@ -68,7 +70,7 @@ foreach (@files) {
}
}
foreach (@versions) {
- if (/^(\d+\.\d+\.\d+)[a-z]*$/) {
+ if (/^(\d+\.\d+\.\d+)[a-z]*(?:-pre\d+)$/) {
my $serie = $1;
push @series, $serie unless grep /^$serie/, @series;
}
@@ -125,32 +127,27 @@ print "Directory sanity check OK\n";
print "Starting release for OpenSSL @versions\n";
if ($do_copy) {
- foreach (@distfiles) {
- system("cp $tmpdir/$_ $srcdir/$_");
- die "Error copying $_ to source directory!" if $?;
- system("cp $tmpdir/$_ $ftpdir/$_");
- die "Error copying $_ to ftp directory!" if $?;
- }
- print "Copied distributions files to source and ftp directories\n";
foreach my $serie (@series) {
+ my @glob_patterns = (
+ "openssl-$serie.tar.gz",
+ "openssl-$serie?.tar.gz",
+ "openssl-$serie-pre[0-9].tar.gz",
+ "openssl-$serie?-pre[0-9].tar.gz",
+ "openssl-$serie-pre[0-9][0-9].tar.gz",
+ "openssl-$serie?-pre[0-9][0-9].tar.gz",
+ );
my $tomove_oldsrc = "$srcdir/old/$serie";
my @tomove_src =
- map {
- my $x = $_;
- $x =~ s|.*/||g;
- grep( /^$x$/, @distfiles ) ? () : $x
- }
+ map { basename ($_) }
grep { -f $_ }
- glob("$srcdir/openssl-$serie.tar.gz $srcdir/openssl-$serie?.tar.gz");
+ map { glob("$srcdir/$_") }
+ @glob_patterns;
my $tomove_oldftp = "$ftpdir/old/$serie";
my @tomove_ftp =
- map {
- my $x = $_;
- $x =~ s|.*/||g;
- grep( /^$x$/, @distfiles ) ? () : $x
- }
+ map { basename ($_) }
grep { -f $_ }
- glob("$ftpdir/openssl-$serie.tar.gz $ftpdir/openssl-$serie?.tar.gz");
+ map { glob("$ftpdir/$_") }
+ @glob_patterns;
mkdir $tomove_oldsrc
or die "Couldn't mkdir $tomove_oldsrc : $!"
@@ -169,6 +166,14 @@ if ($do_copy) {
}
print
"Moved old distributions files to source/old and ftp/old directories\n";
+
+ foreach (@distfiles) {
+ system("cp $tmpdir/$_ $srcdir/$_");
+ die "Error copying $_ to source directory!" if $?;
+ system("cp $tmpdir/$_ $ftpdir/$_");
+ die "Error copying $_ to ftp directory!" if $?;
+ }
+ print "Copied distributions files to source and ftp directories\n";
}
else {
print "Test mode: no files copied\n";
More information about the openssl-commits
mailing list