Skip to content

Commit

Permalink
Modify mkrelease.pl to have a different announce text for premium rel…
Browse files Browse the repository at this point in the history
…eases

^CT-142 Closed
  • Loading branch information
levitte committed Aug 15, 2022
1 parent c60e4aa commit 856ba30
Showing 1 changed file with 65 additions and 4 deletions.
69 changes: 65 additions & 4 deletions release-tools/mkrelease.pl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
require "release-update.pl";
require "release-version.pl";

my @public_bversions = qw( 1.1.1 );
my @premium_bversions = qw( 1.0.2 );

our $debug = 0;
our $verbose = 0;
my @reviewers;
Expand All @@ -37,6 +40,7 @@
my $bversion;
my $ok;
my $label;
my $premium_password;

#Determine include path
our $includepath;
Expand Down Expand Up @@ -100,6 +104,8 @@ sub print_branch_info {
$pre = 0;
} elsif (/^--enter-pre/) {
$pre = 1;
} elsif (/^--premium-password=(.*)$/) {
$premium_password = $1;
} elsif (/^--debug/) {
$debug = 1;
$verbose = 1;
Expand All @@ -121,8 +127,11 @@ sub print_branch_info {
}
}

$_ = openssl_git_current_branch();
die "The OpenSSL branch $_ isn't supported by this script, try dev/release.sh instead\n"
unless /OpenSSL_[0-9]+_[0-9]+_[0-9]+-stable/;

if ($revert) {
$_ = openssl_git_current_branch();
print "Reverting to repository version for $_\n";
system("git reset --hard origin/$_");
die "Error reverting!!" if $?;
Expand All @@ -143,6 +152,8 @@ sub print_branch_info {
}

die "No reviewer set!" unless @reviewers;
die "No premium password given!"
if ((grep { $_ eq $bversion } @premium_bversions) && !$premium_password);

print "Current branch version is $bversion\n";

Expand Down Expand Up @@ -344,14 +355,19 @@ sub print_branch_info {
The OpenSSL Project Team.
EOF
} else {
} elsif (grep { $bversion eq $_ } @public_bversions) {
###### PUBLIC RELEASE TEMPLATE ######

# Using $avers so its length is similar to a real version
# length so it's easier to make the announcement look pretty.
my $avers = $expected_version;

my $title = "OpenSSL version $avers released";
my $underline = "=" x length($title);
print OUT <<EOF;
OpenSSL version $avers released
===============================
$title
$underline
OpenSSL - The Open Source toolkit for SSL/TLS
https://www.openssl.org/
Expand Down Expand Up @@ -385,6 +401,51 @@ sub print_branch_info {
The OpenSSL Project Team.
EOF

} else {
###### PREMIUM RELEASE TEMPLATE ######

# Using $avers so its length is similar to a real version
# length so it's easier to make the announcement look pretty.
my $avers = $expected_version;

my $title = "OpenSSL version $avers released";
my $underline = "=" x length($title);
print OUT <<EOF;
$title
$underline
OpenSSL - The Open Source toolkit for SSL/TLS
https://www.openssl.org/
The OpenSSL project team is pleased to announce the release of
version $avers of our open source toolkit for SSL/TLS.
OpenSSL $avers is available for download via SFTP from the
following location:
* Server: ftp.openssl.org
* Username: premium
* Password: $premium_password
The distribution file name is:
o $tarfile
Size: $length
SHA1 checksum: $sha1hash
SHA256 checksum: $sha256hash
The checksums were calculated using the following commands:
openssl sha1 $tarfile
openssl sha256 $tarfile
Yours,
The OpenSSL Project Team.
EOF

}
Expand Down

0 comments on commit 856ba30

Please sign in to comment.