forked from openssl/tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable a different announcement for premium releases
The basic data of what is considered premium and what is considered public releases, a new bash function is added, std_release_type(), found in release-tools/release-aux/release-data-fn.sh. Along with this, the non-descript variable 'tag' is renamed to 'release_tag', and a spelling error is corrected. Fixes openssl#157
- Loading branch information
Showing
5 changed files
with
85 additions
and
17 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
release-tools/release-aux/openssl-announce-release-premium.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
|
||
|
||
OpenSSL version $release released | ||
================================= | ||
|
||
OpenSSL - The Open Source toolkit for SSL/TLS | ||
https://www.openssl.org/ | ||
|
||
The OpenSSL project team is pleased to announce the release of | ||
version $release of our open source toolkit for SSL/TLS. | ||
|
||
OpenSSL $release is available for download via HTTPS from the following | ||
location on our support system: | ||
|
||
https://github.openssl.org/openssl/extended-releases/releases/tag/$release_tag | ||
|
||
If you have not yet established access to our support system server, | ||
please contact us on [email protected] to arrange your set up. | ||
|
||
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. | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#! /bin/bash | ||
# Copyright 2023 The OpenSSL Project Authors. All Rights Reserved. | ||
# | ||
# Licensed under the Apache License 2.0 (the "License"). You may not use | ||
# this file except in compliance with the License. You can obtain a copy | ||
# in the file LICENSE in the source distribution or at | ||
# https://www.openssl.org/source/license.html | ||
|
||
# Public or premium release? Let the version numbers determine it! | ||
declare -A _ossl_release_types=( | ||
[premium]='^1\.0\.2' | ||
[public]='^(1\.1\.1|[3-9]\.)' | ||
) | ||
|
||
std_release_type () { | ||
local v=$1 | ||
local rt | ||
local re | ||
local release_type= | ||
|
||
for rt in "${!_ossl_release_types[@]}"; do | ||
re="${_ossl_release_types[$rt]}" | ||
if [[ "$v" =~ $re ]]; then | ||
release_type=$rt | ||
break | ||
fi | ||
done | ||
echo $release_type | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -283,6 +283,7 @@ fi | |
found=true | ||
for fn in "$RELEASE_AUX/release-version-fn.sh" \ | ||
"$RELEASE_AUX/release-state-fn.sh" \ | ||
"$RELEASE_AUX/release-data-fn.sh" \ | ||
"$RELEASE_AUX/string-fn.sh" \ | ||
"$RELEASE_AUX/upload-fn.sh"; do | ||
if ! [ -f "$fn" ]; then | ||
|
@@ -297,6 +298,7 @@ fi | |
# Load version functions | ||
. $RELEASE_AUX/release-version-fn.sh | ||
. $RELEASE_AUX/release-state-fn.sh | ||
. $RELEASE_AUX/release-data-fn.sh | ||
# Load string manipulation functions | ||
. $RELEASE_AUX/string-fn.sh | ||
# Load upload backend functions | ||
|
@@ -532,10 +534,10 @@ update_branch=$(format_string "$branch_fmt" \ | |
"v=$FULL_VERSION") | ||
|
||
# Make the release tag and branch name according to our current data | ||
tag=$(format_string "$tag_fmt" \ | ||
"b=$orig_release_branch" \ | ||
"t=$(std_tag_name)" \ | ||
"v=$FULL_VERSION") | ||
release_tag=$(format_string "$tag_fmt" \ | ||
"b=$orig_release_branch" \ | ||
"t=$(std_tag_name)" \ | ||
"v=$FULL_VERSION") | ||
release_branch=$(format_string "$branch_fmt" \ | ||
"b=$orig_release_branch" \ | ||
"t=$(std_tag_name)" \ | ||
|
@@ -599,8 +601,9 @@ if [ -n "$PRE_LABEL" ]; then | |
release_text="$SERIES$_BUILD_METADATA $PRE_LABEL $PRE_NUM" | ||
announce_template=openssl-announce-pre-release.tmpl | ||
else | ||
release_type=$(std_release_type $VERSION) | ||
release_text="$release" | ||
announce_template=openssl-announce-release.tmpl | ||
announce_template=openssl-announce-release-$release_type.tmpl | ||
fi | ||
$VERBOSE "== Updated version information to $release" | ||
|
||
|
@@ -621,8 +624,8 @@ git commit $git_quiet -m "Prepare for release of $release_text"$'\n\nRelease: ye | |
if [ -n "$reviewers" ]; then | ||
addrev --release --nopr $reviewers | ||
fi | ||
$ECHO "Tagging release with tag $tag. You may need to enter a pass phrase" | ||
git tag$tagkey "$tag" -m "OpenSSL $release release tag" | ||
$ECHO "Tagging release with tag $release_tag. You may need to enter a pass phrase" | ||
git tag$tagkey "$release_tag" -m "OpenSSL $release release tag" | ||
|
||
tarfile=openssl-$release.tar | ||
tgzfile=$tarfile.gz | ||
|
@@ -662,6 +665,7 @@ $VERBOSE "== Generating announcement text: $announce" | |
# Hack the announcement template | ||
cat "$RELEASE_AUX/$announce_template" \ | ||
| sed -e "s|\\\$release_text|$release_text|g" \ | ||
-e "s|\\\$release_tag|$release_tag|g" \ | ||
-e "s|\\\$release|$release|g" \ | ||
-e "s|\\\$series|$SERIES|g" \ | ||
-e "s|\\\$label|$PRE_LABEL|g" \ | ||
|
@@ -707,7 +711,7 @@ $VERBOSE "== Generating metadata file: $metadata" | |
fi | ||
echo "release_branch='$orig_release_branch'" | ||
fi | ||
echo "release_tag='$tag'" | ||
echo "release_tag='$release_tag'" | ||
echo "upload_files='${staging_files[@]}'" | ||
echo "source_repo='$orig_remote_url'" | ||
) > ../$metadata | ||
|
@@ -884,7 +888,7 @@ Push them to github, make PRs from them and have them approved. | |
Update branch: $update_branch | ||
Release branch: $release_branch | ||
Tag: $tag | ||
Tag: $release_tag | ||
When merging everything into the main repository, do it like this: | ||
|
@@ -893,7 +897,7 @@ When merging everything into the main repository, do it like this: | |
git push [email protected]:openssl/openssl.git \\ | ||
$update_branch:$orig_update_branch | ||
git push [email protected]:openssl/openssl.git \\ | ||
$tag | ||
$release_tag | ||
EOF | ||
elif [ "$update_branch" != "$orig_update_branch" ]; then | ||
# "Normal" scenario without --branch | ||
|
@@ -903,14 +907,14 @@ repository. Push them to github, make PRs from them and have them | |
approved. | ||
Release/update branch: $update_branch | ||
Tag: $tag | ||
Tag: $release_tag | ||
When merging everything into the main repository, do it like this: | ||
git push [email protected]:openssl/openssl.git \\ | ||
$update_branch:$orig_update_branch | ||
git push [email protected]:openssl/openssl.git \\ | ||
$tag | ||
$release_tag | ||
EOF | ||
elif [ "$release_branch" != "$update_branch" ]; then | ||
# --clean-worktree and --branch scenario | ||
|
@@ -921,7 +925,7 @@ PRs from them and have them approved: | |
Updated branch: $update_branch | ||
Release branch: $release_branch | ||
Tag: $tag | ||
Tag: $release_tag | ||
When merging everything into the main repository, do it like this: | ||
|
@@ -930,7 +934,7 @@ When merging everything into the main repository, do it like this: | |
git push [email protected]:openssl/openssl.git \\ | ||
$update_branch | ||
git push [email protected]:openssl/openssl.git \\ | ||
$tag | ||
$release_tag | ||
EOF | ||
else | ||
# --clean-worktree without --branch scenario | ||
|
@@ -940,14 +944,14 @@ branch has been updated. Push them to github, make PRs from them and | |
have them approved. | ||
Release/update branch: $update_branch | ||
Tag: $tag | ||
Tag: $release_tag | ||
When merging everything into the main repository, do it like this: | ||
git push [email protected]:openssl/openssl.git \\ | ||
$update_branch | ||
git push [email protected]:openssl/openssl.git \\ | ||
$tag | ||
$release_tag | ||
EOF | ||
fi | ||
|
||
|