upload@dev.openssl.org)
--no-upload Don't upload the release files.
--no-update Don't perform 'make update' and 'make update-fips-checksums'.
+--quiet Really quiet, only the final output will still be output.
--verbose Verbose output.
--debug Include debug output. Implies --no-upload.
+--porcelain Give the output in an easy-to-parse format for scripts.
--force Force execution
do_clean=true
do_upload=true
do_update=true
+ECHO=echo
DEBUG=:
VERBOSE=:
git_quiet=-q
+do_porcelain=false
force=false
-l 'branch' \
-l 'upload-address:' \
-l 'no-upload,no-update' \
- -l 'verbose,debug' \
+ -l 'quiet,verbose,debug' \
+ -l 'porcelain' \
-l 'local-user:' \
-l 'reviewer:' \
-l 'force' \
do_update=false
shift
;;
+ --quiet )
+ ECHO=:
+ VERBOSE=:
+ shift
+ ;;
--verbose )
+ ECHO=echo
VERBOSE=echo
git_quiet=
shift
shift
shift
;;
+ --porcelain )
+ do_porcelain=true
+ shift
+ ;;
--force )
force=true
shift
# Initialize #########################################################
-echo "== Initializing work tree"
+$ECHO "== Initializing work tree"
# Generate a cloned directory name
release_clone="$orig_branch-release-tmp"
-echo "== Work tree will be in $release_clone"
+$ECHO "== Work tree will be in $release_clone"
# Make a clone in a subdirectory and move there
if ! [ -d "$release_clone" ]; then
$VERBOSE "== Creating a local release branch: $tmp_release_branch"
git checkout $git_quiet -b "$tmp_release_branch"
-echo "== Configuring OpenSSL for update and release. This may take a bit of time"
+$ECHO "== Configuring OpenSSL for update and release. This may take a bit of time"
./Configure cc >&42
if [ -n "$reviewers" ]; then
addrev --release --nopr $reviewers
fi
-echo "Tagging release with tag $tag. You may need to enter a pass phrase"
+$ECHO "Tagging release with tag $tag. You may need to enter a pass phrase"
git tag$tagkey "$tag" -m "OpenSSL $release release tag"
tarfile=openssl-$release.tar
tgzfile=$tarfile.gz
announce=openssl-$release.txt
-echo "== Generating tar, hash and announcement files. This make take a bit of time"
+$ECHO "== Generating tar, hash and announcement files. This make take a bit of time"
$VERBOSE "== Making tarfile: $tgzfile"
$VERBOSE "== Generating signatures: $tgzfile.asc $announce.asc"
rm -f "../$tgzfile.asc" "../$announce.asc"
-echo "Signing the release files. You may need to enter a pass phrase"
+$ECHO "Signing the release files. You may need to enter a pass phrase"
gpg$gpgkey --use-agent -sba "../$tgzfile"
gpg$gpgkey --use-agent -sta --clearsign "../$announce"
git push --follow-tags parent HEAD
if $do_upload; then
- echo "== Upload tar, hash and announcement files"
+ $ECHO "== Upload tar, hash and announcement files"
fi
(
fi
fi
-# Push everything to the parent repo
-$VERBOSE "== Push what we have to the parent repository"
-git push parent HEAD
+if ! $clean_worktree; then
+ # Push everything to the parent repo
+ $VERBOSE "== Push what we have to the parent repository"
+ git push parent HEAD
+fi
# Done ###############################################################
$VERBOSE "== Done"
cd $HERE
-cat <<EOF
+if $do_porcelain; then
+ echo "clone_directory='$release_clone'"
+ echo "update_branch='$tmp_update_branch'"
+ echo "final_update_branch='$update_branch'"
+ if [ "$tmp_release_branch" != "$tmp_update_branch" ]; then
+ echo "release_branch='$tmp_release_branch'"
+ echo "final_release_branch='$release_branch'"
+ fi
+ echo "release_tag='$tag'"
+else
+ cat <<EOF
======================================================================
The release is done, and involves a few files and commits for you to
EOF
-if $do_release; then
- cat <<EOF
+ if $do_release; then
+ cat <<EOF
The following files were uploaded to $upload_address, please ensure they
are dealt with appropriately:
$tgzfile.asc
$announce.asc
EOF
-fi
+ fi
-cat <<EOF
+ cat <<EOF
----------------------------------------------------------------------
EOF
-if $do_branch; then
- cat <<EOF
+ if $do_branch; then
+ cat <<EOF
You need to prepare the main repository with a new branch, '$release_branch'.
That is done directly in the server's bare repository like this:
git push git@github.openssl.org:openssl/openssl.git \\
$tag
EOF
-else
-cat <<EOF
+ else
+ cat <<EOF
One additional release branch has been added to your repository.
Push it to github, make a PR from it and have it approved:
git push git@github.openssl.org:openssl/openssl.git \\
$tag
EOF
-fi
+ fi
-cat <<EOF
+ cat <<EOF
----------------------------------------------------------------------
EOF
-cat <<EOF
+ cat <<EOF
When everything is done, or if something went wrong and you want to start
over, simply clean away temporary things left behind:
rm -rf $release_clone
EOF
-if $do_branch; then
- cat <<EOF
+ if $do_branch; then
+ cat <<EOF
The additional release branches:
git branch -D $tmp_release_branch
git branch -D $tmp_update_branch
EOF
-else
- cat <<EOF
+ else
+ cat <<EOF
The temporary release branch:
git branch -D $tmp_release_branch
EOF
+ fi
fi
exit 0
B<--upload-address>=I<address> |
B<--no-upload> |
B<--no-update> |
+B<--quiet> |
B<--verbose> |
B<--debug> |
+B<--porcelain> |
B<--help> |
B<--manual>
]
Don't run C<make update> and C<make update-fips-checksums>.
+=item B<--quiet>
+
+Really quiet, only bare necessity output, which is the final instructions,
+or should the B<--porcelain> option be used, only that output.
+
+messages appearing on standard error will still be shown, but should be
+fairly minimal.
+
=item B<--verbose>
Verbose output.
Display extra debug output. Implies B<--no-upload>
+=item B<--porcelain>
+
+Give final output in an easy-to-parse format for scripts. The output comes
+in a form reminicent of shell variable assignments. Currently supported are:
+
+=over 4
+
+=item B<clone_directory>=I<dir>
+
+The directory for the clone that this script creates.
+
+=item B<update_branch>=I<branch>
+
+The temporary update branch
+
+=item B<final_update_branch>=I<branch>
+
+The final update branch that the temporary update branch should end up being
+merged into.
+
+=item B<release_branch>=I<branch>
+
+The temporary release branch, only given if it differs from the update branch
+(i.e. B<--branch> was given or implied).
+
+=item B<final_release_branch>=I<branch>
+
+The final release branch that the temporary release branch should end up being
+merged into. This is only given if it differs from the final update branch
+(i.e. B<--branch> was given or implied).
+
+=item B<release_tag>=I<tag>
+
+The release tag.
+
+=back
+
=item B<--local-user>=I<keyid>
Use I<keyid> as the local user for C<git tag> and for signing with C<gpg>.