diff --git a/release-tools/publish-releases.sh b/release-tools/publish-releases.sh index d7e8dbf..3ba8c95 100644 --- a/release-tools/publish-releases.sh +++ b/release-tools/publish-releases.sh @@ -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" @@ -121,6 +121,11 @@ while true; do tag_key=" -u $1" shift ;; + --reviewer ) + reviewers+=" $1=$2" + shift + shift + ;; --no-upload ) shift do_upload=false @@ -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 @@ -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 @@ -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 )