Skip to content

Commit

Permalink
fixup! release-tools/publish-releases.sh: New script, to publish stag…
Browse files Browse the repository at this point in the history
…ed releases

This adds the --reviewer option and makes it mandatory
  • Loading branch information
levitte committed May 24, 2023
1 parent 0addde6 commit 4fe4a74
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions release-tools/publish-releases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ TEMP=$(getopt -l 'all,version:' \
-l 'upload-location:,gh-release-repository:' \
-l 'data-repository:' \
-l 'public,premium,security,custom' \
-l 'email:' \
-l 'email:,reviewer:' \
-l 'no-upload,no-update,no-mail' \
-n publish-release.sh -- - "$@")
eval set -- "$TEMP"
Expand Down Expand Up @@ -121,6 +121,11 @@ while true; do
tag_key=" -u $1"
shift
;;
--reviewer )
reviewers+=" $1=$2"
shift
shift
;;
--no-upload )
shift
do_upload=false
Expand Down Expand Up @@ -340,13 +345,6 @@ for d in "${data_files[@]}"; do
fi
fi
# Now that we know what branch we're dealing with, update the
# checked out staging repo
(
cd staging
git checkout $update_branch
)
orig_source_repo=$source_repo
# If the source repository is on github.com, we know that
Expand All @@ -357,6 +355,19 @@ for d in "${data_files[@]}"; do
# how to convert it to git+ssh format.
source_repo=${source_repo/#https:\/\/github.openssl.org\//git@github.openssl.org:}
source_remote_name=$(basename "$source_repo" .git)
# Now that we know what branch we're dealing with, update the
# checked out staging repo, and add / update a remote for the
# source repo.
(
cd staging
git checkout $update_branch
if ! git remote get-url $source_remote_name >/dev/null 2>&1; then
git remote add $source_remote_name $source_repo
fi
git fetch $source_remote_name
)
# Create a newsflash line from the full version info
v=${release_full_version%%+*} # version without build metadata
t=${v#*-} # The pre-release tag
Expand Down Expand Up @@ -441,6 +452,8 @@ for d in "${data_files[@]}"; do
if $do_update; then
(
cd staging
addrev --nopr $reviewers \
$source_remote_name/$update_branch..HEAD
git push $source_repository $update_branch $release_tag
)
Expand Down

0 comments on commit 4fe4a74

Please sign in to comment.