-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable a different announcement for premium releases #160
Closed
+85
−17
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tracked down if possible to give wrong $VERSION. If yes, this would result in:
"announce_template=openssl-announce-release-.tmpl" since "std_release_type" function returns empty string if doesn't meet the regular expression criteria (to return "premium" or "public".