release.sh 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809
  1. #! /bin/bash -e
  2. # Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
  3. #
  4. # Licensed under the Apache License 2.0 (the "License"). You may not use
  5. # this file except in compliance with the License. You can obtain a copy
  6. # in the file LICENSE in the source distribution or at
  7. # https://www.openssl.org/source/license.html
  8. # This is the most shell agnostic way to specify that POSIX rules.
  9. POSIXLY_CORRECT=1
  10. usage () {
  11. cat <<EOF
  12. Usage: release.sh [ options ... ]
  13. --alpha Start or increase the "alpha" pre-release tag.
  14. --next-beta Switch to the "beta" pre-release tag after alpha release.
  15. It can only be given with --alpha.
  16. --beta Start or increase the "beta" pre-release tag.
  17. --final Get out of "alpha" or "beta" and make a final release.
  18. Implies --branch.
  19. --branch Create a release branch 'openssl-{major}.{minor}.x',
  20. where '{major}' and '{minor}' are the major and minor
  21. version numbers.
  22. --reviewer=<id> The reviewer of the commits.
  23. --local-user=<keyid>
  24. For the purpose of signing tags and tar files, use this
  25. key (default: use the default e-mail address’ key).
  26. --no-upload Don't upload to upload@dev.openssl.org.
  27. --no-update Don't perform 'make update'.
  28. --verbose Verbose output.
  29. --debug Include debug output. Implies --no-upload.
  30. --force Force execution
  31. --help This text
  32. --manual The manual
  33. If none of --alpha, --beta, or --final are given, this script tries to
  34. figure out the next step.
  35. EOF
  36. exit 0
  37. }
  38. # Set to one of 'major', 'minor', 'alpha', 'beta' or 'final'
  39. next_method=
  40. next_method2=
  41. do_branch=false
  42. warn_branch=false
  43. do_clean=true
  44. do_upload=true
  45. do_update=true
  46. DEBUG=:
  47. VERBOSE=:
  48. git_quiet=-q
  49. force=false
  50. do_help=false
  51. do_manual=false
  52. tagkey=' -s'
  53. gpgkey=
  54. reviewers=
  55. upload_address=upload@dev.openssl.org
  56. TEMP=$(getopt -l 'alpha,next-beta,beta,final' \
  57. -l 'branch' \
  58. -l 'no-upload,no-update' \
  59. -l 'verbose,debug' \
  60. -l 'local-user:' \
  61. -l 'reviewer:' \
  62. -l 'force' \
  63. -l 'help,manual' \
  64. -n release.sh -- - "$@")
  65. eval set -- "$TEMP"
  66. while true; do
  67. case $1 in
  68. --alpha | --beta | --final )
  69. next_method=$(echo "x$1" | sed -e 's|^x--||')
  70. if [ -z "$next_method2" ]; then
  71. next_method2=$next_method
  72. fi
  73. shift
  74. if [ "$next_method" = 'final' ]; then
  75. do_branch=true
  76. fi
  77. ;;
  78. --next-beta )
  79. next_method2=$(echo "x$1" | sed -e 's|^x--next-||')
  80. shift
  81. ;;
  82. --branch )
  83. do_branch=true
  84. warn_branch=true
  85. shift
  86. ;;
  87. --no-upload )
  88. do_upload=false
  89. shift
  90. ;;
  91. --no-update )
  92. do_update=false
  93. shift
  94. ;;
  95. --verbose )
  96. VERBOSE=echo
  97. git_quiet=
  98. shift
  99. ;;
  100. --debug )
  101. DEBUG=echo
  102. do_upload=false
  103. shift
  104. ;;
  105. --local-user )
  106. shift
  107. tagley=" -u $1"
  108. gpgkey=" -u $1"
  109. shift
  110. ;;
  111. --reviewer )
  112. reviewers="$reviewers $1=$2"
  113. shift
  114. shift
  115. ;;
  116. --force )
  117. force=true
  118. shift
  119. ;;
  120. --help )
  121. usage
  122. exit 0
  123. ;;
  124. --manual )
  125. sed -e '1,/^### BEGIN MANUAL/d' \
  126. -e '/^### END MANUAL/,$d' \
  127. < "$0" \
  128. | pod2man \
  129. | man -l -
  130. exit 0
  131. ;;
  132. -- )
  133. shift
  134. break
  135. ;;
  136. * )
  137. echo >&2 "Unknown option $1"
  138. shift
  139. exit 1
  140. ;;
  141. esac
  142. done
  143. $DEBUG >&2 "DEBUG: \$next_method=$next_method"
  144. $DEBUG >&2 "DEBUG: \$next_method2=$next_method2"
  145. $DEBUG >&2 "DEBUG: \$do_branch=$do_branch"
  146. $DEBUG >&2 "DEBUG: \$do_upload=$do_upload"
  147. $DEBUG >&2 "DEBUG: \$do_update=$do_update"
  148. $DEBUG >&2 "DEBUG: \$DEBUG=$DEBUG"
  149. $DEBUG >&2 "DEBUG: \$VERBOSE=$VERBOSE"
  150. $DEBUG >&2 "DEBUG: \$git_quiet=$git_quiet"
  151. case "$next_method+$next_method2" in
  152. major+major | minor+minor )
  153. # These are expected
  154. ;;
  155. alpha+alpha | alpha+beta | beta+beta | final+final | + | +beta )
  156. # These are expected
  157. ;;
  158. * )
  159. echo >&2 "Internal option error ($next_method, $next_method2)"
  160. exit 1
  161. ;;
  162. esac
  163. # Verbosity feed for certain commands
  164. VERBOSITY_FIFO=/tmp/openssl-$$.fifo
  165. mkfifo -m 600 $VERBOSITY_FIFO
  166. ( cat $VERBOSITY_FIFO | while read L; do $VERBOSE "> $L"; done ) &
  167. exec 42>$VERBOSITY_FIFO
  168. trap "exec 42>&-; rm $VERBOSITY_FIFO" 0 2
  169. # Setup ##############################################################
  170. # Make sure we're in the work directory
  171. cd $(dirname $0)/..
  172. HERE=$(pwd)
  173. # Check that we have the scripts that define functions we use
  174. found=true
  175. for fn in "$HERE/dev/release-aux/release-version-fn.sh" \
  176. "$HERE/dev/release-aux/release-state-fn.sh"; do
  177. if ! [ -f "$fn" ]; then
  178. echo >&2 "'$fn' is missing"
  179. found=false
  180. fi
  181. done
  182. if ! $found; then
  183. exit 1
  184. fi
  185. # Load version functions
  186. . $HERE/dev/release-aux/release-version-fn.sh
  187. . $HERE/dev/release-aux/release-state-fn.sh
  188. # Make sure it's a branch we recognise
  189. orig_branch=$(git rev-parse --abbrev-ref HEAD)
  190. if (echo "$orig_branch" \
  191. | grep -E -q \
  192. -e '^master$' \
  193. -e '^OpenSSL_[0-9]+_[0-9]+_[0-9]+[a-z]*-stable$' \
  194. -e '^openssl-[0-9]+\.[0-9]+\.x$'); then
  195. :
  196. elif $force; then
  197. :
  198. else
  199. echo >&2 "Not in master or any recognised release branch"
  200. echo >&2 "Please 'git checkout' an approprite branch"
  201. exit 1
  202. fi
  203. orig_HEAD=$(git rev-parse HEAD)
  204. # Initialize #########################################################
  205. echo "== Initializing work tree"
  206. get_version
  207. # Generate a cloned directory name
  208. release_clone="$orig_branch-release-tmp"
  209. echo "== Work tree will be in $release_clone"
  210. # Make a clone in a subdirectory and move there
  211. if ! [ -d "$release_clone" ]; then
  212. $VERBOSE "== Cloning to $release_clone"
  213. git clone $git_quiet -b "$orig_branch" -o parent . "$release_clone"
  214. fi
  215. cd "$release_clone"
  216. get_version
  217. # Branches we will work with. The release branch is where we make the
  218. # changes for the release, the update branch is where we make the post-
  219. # release changes
  220. update_branch="$orig_branch"
  221. release_branch="openssl-$SERIES.x"
  222. # among others, we only create a release branch if the patch number is zero
  223. if [ "$update_branch" = "$release_branch" ] || [ $PATCH -ne 0 ]; then
  224. if $do_branch && $warn_branch; then
  225. echo >&2 "Warning! We're already in a release branch; --branch ignored"
  226. fi
  227. do_branch=false
  228. fi
  229. if ! $do_branch; then
  230. release_branch="$update_branch"
  231. fi
  232. # Branches we create for PRs
  233. branch_version="$VERSION${PRE_LABEL:+-$PRE_LABEL$PRE_NUM}"
  234. tmp_update_branch="OSSL--$update_branch--$branch_version"
  235. tmp_release_branch="OSSL--$release_branch--$branch_version"
  236. # Check that we're still on the same branch as our parent repo, or on a
  237. # release branch
  238. current_branch=$(git rev-parse --abbrev-ref HEAD)
  239. if [ "$current_branch" = "$update_branch" ]; then
  240. :
  241. elif [ "$current_branch" = "$release_branch" ]; then
  242. :
  243. else
  244. echo >&2 "The cloned sub-directory '$release_clone' is on a branch"
  245. if [ "$update_branch" = "$release_branch" ]; then
  246. echo >&2 "other than '$update_branch'."
  247. else
  248. echo >&2 "other than '$update_branch' or '$release_branch'."
  249. fi
  250. echo >&2 "Please 'cd \"$(pwd)\"; git checkout $update_branch'"
  251. exit 1
  252. fi
  253. SOURCEDIR=$(pwd)
  254. $DEBUG >&2 "DEBUG: Source directory is $SOURCEDIR"
  255. # Release ############################################################
  256. # We always expect to start from a state of development
  257. if [ "$TYPE" != 'dev' ]; then
  258. echo >&2 "Not in a development branch"
  259. echo >&2 "Have a look at the git log in $release_clone, it may be that"
  260. echo >&2 "a previous crash left it in an intermediate state and that"
  261. echo >&2 "need to drop the top commit:"
  262. echo >&2 ""
  263. echo >&2 "(cd $release_clone; git reset --hard HEAD^)"
  264. echo >&2 "# WARNING! LOOK BEFORE YOU ACT"
  265. exit 1
  266. fi
  267. # Update the version information. This won't save anything anywhere, yet,
  268. # but does check for possible next_method errors before we do bigger work.
  269. next_release_state "$next_method"
  270. # Create our temporary release branch
  271. $VERBOSE "== Creating a local release branch: $tmp_release_branch"
  272. git checkout $git_quiet -b "$tmp_release_branch"
  273. echo "== Configuring OpenSSL for update and release. This may take a bit of time"
  274. ./Configure cc >&42
  275. $VERBOSE "== Checking source file updates"
  276. make update >&42
  277. if [ -n "$(git status --porcelain)" ]; then
  278. $VERBOSE "== Committing updates"
  279. git add -u
  280. git commit $git_quiet -m 'make update'
  281. if [ -n "$reviewers" ]; then
  282. addrev --nopr $reviewers
  283. fi
  284. fi
  285. # Create our temporary update branch, if it's not the release branch.
  286. # This is used in post-release below
  287. if $do_branch; then
  288. $VERBOSE "== Creating a local update branch: $tmp_update_branch"
  289. git branch $git_quiet "$tmp_update_branch"
  290. fi
  291. # Write the version information we updated
  292. set_version
  293. if [ -n "$PRE_LABEL" ]; then
  294. release="$VERSION-$PRE_RELEASE_TAG$BUILD_METADATA"
  295. release_text="$SERIES$BUILD_METADATA $PRE_LABEL $PRE_NUM"
  296. announce_template=openssl-announce-pre-release.tmpl
  297. else
  298. release="$VERSION$BUILD_METADATA"
  299. release_text="$release"
  300. announce_template=openssl-announce-release.tmpl
  301. fi
  302. tag="openssl-$release"
  303. $VERBOSE "== Updated version information to $release"
  304. $VERBOSE "== Updating files with release date for $release : $RELEASE_DATE"
  305. for fixup in "$HERE/dev/release-aux"/fixup-*-release.pl; do
  306. file="$(basename "$fixup" | sed -e 's|^fixup-||' -e 's|-release\.pl$||')"
  307. $VERBOSE "> $file"
  308. RELEASE="$release" RELEASE_TEXT="$release_text" RELEASE_DATE="$RELEASE_DATE" \
  309. perl -pi $fixup $file
  310. done
  311. $VERBOSE "== Comitting updates and tagging"
  312. git add -u
  313. git commit $git_quiet -m "Prepare for release of $release_text"
  314. if [ -n "$reviewers" ]; then
  315. addrev --nopr $reviewers
  316. fi
  317. echo "Tagging release with tag $tag. You may need to enter a pass phrase"
  318. git tag$tagkey "$tag" -m "OpenSSL $release release tag"
  319. tarfile=openssl-$release.tar
  320. tgzfile=$tarfile.gz
  321. announce=openssl-$release.txt
  322. echo "== Generating tar, hash and announcement files. This make take a bit of time"
  323. $VERBOSE "== Making tarfile: $tgzfile"
  324. # Unfortunately, util/mktar.sh does verbose output on STDERR... for good
  325. # reason, but it means we don't display errors unless --verbose
  326. ./util/mktar.sh --tarfile="../$tarfile" 2>&1 \
  327. | while read L; do $VERBOSE "> $L"; done
  328. if ! [ -f "../$tgzfile" ]; then
  329. echo >&2 "Where did the tarball end up? (../$tgzfile)"
  330. exit 1
  331. fi
  332. $VERBOSE "== Generating checksums: $tgzfile.sha1 $tgzfile.sha256"
  333. openssl sha1 < "../$tgzfile" | \
  334. (IFS='='; while read X H; do echo $H; done) > "../$tgzfile.sha1"
  335. openssl sha256 < "../$tgzfile" | \
  336. (IFS='='; while read X H; do echo $H; done) > "../$tgzfile.sha256"
  337. length=$(wc -c < "../$tgzfile")
  338. sha1hash=$(cat "../$tgzfile.sha1")
  339. sha256hash=$(cat "../$tgzfile.sha256")
  340. $VERBOSE "== Generating announcement text: $announce"
  341. # Hack the announcement template
  342. cat "$HERE/dev/release-aux/$announce_template" \
  343. | sed -e "s|\\\$release_text|$release_text|g" \
  344. -e "s|\\\$release|$release|g" \
  345. -e "s|\\\$series|$SERIES|g" \
  346. -e "s|\\\$label|$PRE_LABEL|g" \
  347. -e "s|\\\$tarfile|$tgzfile|" \
  348. -e "s|\\\$length|$length|" \
  349. -e "s|\\\$sha1hash|$sha1hash|" \
  350. -e "s|\\\$sha256hash|$sha256hash|" \
  351. | perl -p "$HERE/dev/release-aux/fix-title.pl" \
  352. > "../$announce"
  353. $VERBOSE "== Generating signatures: $tgzfile.asc $announce.asc"
  354. rm -f "../$tgzfile.asc" "../$announce.asc"
  355. echo "Signing the release files. You may need to enter a pass phrase"
  356. gpg$gpgkey --use-agent -sba "../$tgzfile"
  357. gpg$gpgkey --use-agent -sta --clearsign "../$announce"
  358. # Push everything to the parent repo
  359. $VERBOSE "== Push what we have to the parent repository"
  360. git push --follow-tags parent HEAD
  361. if $do_upload; then
  362. (
  363. if [ "$VERBOSE" != ':' ]; then
  364. echo "progress"
  365. fi
  366. echo "put ../$tgzfile"
  367. echo "put ../$tgzfile.sha1"
  368. echo "put ../$tgzfile.sha256"
  369. echo "put ../$tgzfile.asc"
  370. echo "put ../$announce.asc"
  371. ) \
  372. | sftp "$upload_address"
  373. fi
  374. # Post-release #######################################################
  375. $VERBOSE "== Reset all files to their pre-release contents"
  376. git reset $git_quiet HEAD^ -- .
  377. git checkout -- .
  378. prev_release_text="$release_text"
  379. prev_release_date="$RELEASE_DATE"
  380. next_release_state "$next_method2"
  381. set_version
  382. release="$VERSION-$PRE_RELEASE_TAG$BUILD_METADATA"
  383. release_text="$VERSION$BUILD_METADATA"
  384. if [ -n "$PRE_LABEL" ]; then
  385. release_text="$SERIES$BUILD_METADATA $PRE_LABEL $PRE_NUM"
  386. fi
  387. $VERBOSE "== Updated version information to $release"
  388. $VERBOSE "== Updating files for $release :"
  389. for fixup in "$HERE/dev/release-aux"/fixup-*-postrelease.pl; do
  390. file="$(basename "$fixup" | sed -e 's|^fixup-||' -e 's|-postrelease\.pl$||')"
  391. $VERBOSE "> $file"
  392. RELEASE="$release" RELEASE_TEXT="$release_text" \
  393. PREV_RELEASE_TEXT="$prev_release_text" \
  394. PREV_RELEASE_DATE="$prev_release_date" \
  395. perl -pi $fixup $file
  396. done
  397. $VERBOSE "== Comitting updates"
  398. git add -u
  399. git commit $git_quiet -m "Prepare for $release_text"
  400. if [ -n "$reviewers" ]; then
  401. addrev --nopr $reviewers
  402. fi
  403. # Push everything to the parent repo
  404. $VERBOSE "== Push what we have to the parent repository"
  405. git push parent HEAD
  406. if $do_branch; then
  407. $VERBOSE "== Going back to the update branch $tmp_update_branch"
  408. git checkout $git_quiet "$tmp_update_branch"
  409. get_version
  410. next_release_state "minor"
  411. set_version
  412. release="$VERSION-$PRE_RELEASE_TAG$BUILD_METADATA"
  413. release_text="$SERIES$BUILD_METADATA"
  414. $VERBOSE "== Updated version information to $release"
  415. $VERBOSE "== Updating files for $release :"
  416. for fixup in "$HERE/dev/release-aux"/fixup-*-postrelease.pl; do
  417. file="$(basename "$fixup" | sed -e 's|^fixup-||' -e 's|-postrelease\.pl$||')"
  418. $VERBOSE "> $file"
  419. RELEASE="$release" RELEASE_TEXT="$release_text" \
  420. perl -pi $fixup $file
  421. done
  422. $VERBOSE "== Comitting updates"
  423. git add -u
  424. git commit $git_quiet -m "Prepare for $release_text"
  425. if [ -n "$reviewers" ]; then
  426. addrev --nopr $reviewers
  427. fi
  428. fi
  429. # Push everything to the parent repo
  430. $VERBOSE "== Push what we have to the parent repository"
  431. git push parent HEAD
  432. # Done ###############################################################
  433. $VERBOSE "== Done"
  434. cd $HERE
  435. cat <<EOF
  436. ======================================================================
  437. The release is done, and involves a few files and commits for you to
  438. deal with. Everything you need has been pushed to your repository,
  439. please see instructions that follow.
  440. ======================================================================
  441. EOF
  442. if $do_release; then
  443. cat <<EOF
  444. The following files were uploaded to $upload_address, please ensure they
  445. are dealt with appropriately:
  446. $tgzfile
  447. $tgzfile.sha1
  448. $tgzfile.sha256
  449. $tgzfile.asc
  450. $announce.asc
  451. EOF
  452. fi
  453. cat <<EOF
  454. ----------------------------------------------------------------------
  455. EOF
  456. if $do_branch; then
  457. cat <<EOF
  458. You need to prepare the main repository with a new branch, '$release_branch'.
  459. That is done directly in the server's bare repository like this:
  460. git branch $release_branch $orig_HEAD
  461. Two additional release branches have been added to your repository.
  462. Push them to github, make PRs from them and have them approved:
  463. $tmp_update_branch
  464. $tmp_release_branch
  465. When merging them into the main repository, do it like this:
  466. git push --follow-tags openssl-git@git.openssl.org:openssl.git \\
  467. $tmp_release_branch:$release_branch
  468. git push openssl-git@git.openssl.org:openssl.git \\
  469. $tmp_update_branch:$update_branch
  470. EOF
  471. else
  472. cat <<EOF
  473. One additional release branch has been added to your repository.
  474. Push it to github, make a PR from it and have it approved:
  475. $tmp_release_branch
  476. When merging it into the main repository, do it like this:
  477. git push --follow-tags openssl-git@git.openssl.org:openssl.git \\
  478. $tmp_release_branch:$release_branch
  479. EOF
  480. fi
  481. cat <<EOF
  482. ----------------------------------------------------------------------
  483. EOF
  484. cat <<EOF
  485. When everything is done, or if something went wrong and you want to start
  486. over, simply clean away temporary things left behind:
  487. The release worktree:
  488. rm -rf $release_clone
  489. EOF
  490. if $do_branch; then
  491. cat <<EOF
  492. The additional release branches:
  493. git branch -D $tmp_release_branch
  494. git branch -D $tmp_update_branch
  495. EOF
  496. else
  497. cat <<EOF
  498. The temporary release branch:
  499. git branch -D $tmp_release_branch
  500. EOF
  501. fi
  502. exit 0
  503. # cat is inconsequential, it's only there to fend off zealous shell parsers
  504. # that parse all the way here.
  505. cat <<EOF
  506. ### BEGIN MANUAL
  507. =pod
  508. =head1 NAME
  509. release.sh - OpenSSL release script
  510. =head1 SYNOPSIS
  511. B<release.sh>
  512. [
  513. B<--alpha> |
  514. B<--next-beta> |
  515. B<--beta> |
  516. B<--final> |
  517. B<--branch> |
  518. B<--local-user>=I<keyid> |
  519. B<--reviewer>=I<id> |
  520. B<--no-upload> |
  521. B<--no-update> |
  522. B<--verbose> |
  523. B<--debug> |
  524. B<--help> |
  525. B<--manual>
  526. ]
  527. =head1 DESCRIPTION
  528. B<release.sh> creates an OpenSSL release, given current worktree conditions.
  529. It will refuse to work unless the current branch is C<master> or a release
  530. branch (see L</RELEASE BRANCHES AND TAGS> below for a discussion on those).
  531. B<release.sh> tries to be smart and figure out the next release if no hints
  532. are given through options, and will exit with an error in ambiguous cases.
  533. B<release.sh> finishes off with instructions on what to do next. When
  534. finishing commands are given, they must be followed exactly.
  535. B<release.sh> leaves behind a clone of the local workspace, as well as one
  536. or two branches in the local repository. These will be mentioned and can
  537. safely be removed after all instructions have been successfully followed.
  538. =head1 OPTIONS
  539. =over 4
  540. =item B<--alpha>, B<--beta>
  541. Set the state of this branch to indicate that alpha or beta releases are
  542. to be done.
  543. B<--alpha> is only acceptable if the I<PATCH> version number is zero and
  544. the current state is "in development" or that alpha releases are ongoing.
  545. B<--beta> is only acceptable if the I<PATCH> version number is zero and
  546. that alpha or beta releases are ongoing.
  547. =item B<--next-beta>
  548. Use together with B<--alpha> to switch to beta releases after the current
  549. release is done.
  550. =item B<--final>
  551. Set the state of this branch to indicate that regular releases are to be
  552. done. This is only valid if alpha or beta releases are currently ongoing.
  553. This implies B<--branch>.
  554. =item B<--branch>
  555. Create a branch specific for the I<SERIES>.x release series, if it doesn't
  556. already exist, and switch to it. The exact branch name will be
  557. C<< openssl-I<SERIES>.x >>.
  558. =item B<--no-upload>
  559. Don't upload the produced files.
  560. =item B<--no-update>
  561. Don't run C<make update>.
  562. =item B<--verbose>
  563. Verbose output.
  564. =item B<--debug>
  565. Display extra debug output. Implies B<--no-upload>
  566. =item B<--local-user>=I<keyid>
  567. Use I<keyid> as the local user for C<git tag> and for signing with C<gpg>.
  568. If not given, then the default e-mail address' key is used.
  569. =item B<--reviewer>=I<id>
  570. Add I<id> to the set of reviewers for the commits performed by this script.
  571. Multiple reviewers are allowed.
  572. If no reviewer is given, you will have to run C<addrev> manually, which
  573. means retagging a release commit manually as well.
  574. =item B<--force>
  575. Force execution. Precisely, the check that the current branch is C<master>
  576. or a release branch is not done.
  577. =item B<--help>
  578. Display a quick help text and exit.
  579. =item B<--manual>
  580. Display this manual and exit.
  581. =back
  582. =head1 RELEASE BRANCHES AND TAGS
  583. Prior to OpenSSL 3.0, the release branches were named
  584. C<< OpenSSL_I<SERIES>-stable >>, and the release tags were named
  585. C<< OpenSSL_I<VERSION> >> for regular releases, or
  586. C<< OpenSSL_I<VERSION>-preI<n> >> for pre-releases.
  587. From OpenSSL 3.0 ongoing, the release branches are named
  588. C<< openssl-I<SERIES>.x >>, and the release tags are named
  589. C<< openssl-I<VERSION> >> for regular releases, or
  590. C<< openssl-I<VERSION>-alphaI<n> >> for alpha releases
  591. and C<< openssl-I<VERSION>-betaI<n> >> for beta releases.
  592. B<release.sh> recognises both forms.
  593. =head1 VERSION AND STATE
  594. With OpenSSL 3.0, all the version and state information is in the file
  595. F<VERSION.dat>, where the following variables are used and changed:
  596. =over 4
  597. =item B<MAJOR>, B<MINOR>, B<PATCH>
  598. The three part of the version number.
  599. =item B<PRE_RELEASE_TAG>
  600. The indicator of the current state of the branch. The value may be one pf:
  601. =over 4
  602. =item C<dev>
  603. This branch is "in development". This is typical for the C<master> branch
  604. unless there are ongoing alpha or beta releases.
  605. =item C<< alphaI<n> >> or C<< alphaI<n>-dev >>
  606. This branch has alpha releases going on. C<< alphaI<n>-dev >> is what
  607. should normally be seen in the git workspace, indicating that
  608. C<< alphaI<n> >> is in development. C<< alphaI<n> >> is what should be
  609. found in the alpha release tar file.
  610. =item C<< alphaI<n> >> or C<< alphaI<n>-dev >>
  611. This branch has beta releases going on. The details are otherwise exactly
  612. as for alpha.
  613. =item I<no value>
  614. This is normally not seen in the git workspace, but should always be what's
  615. found in the tar file of a regular release.
  616. =back
  617. =item B<RELEASE_DATE>
  618. This is normally empty in the git workspace, but should always have the
  619. release date in the tar file of any release.
  620. =back
  621. =head1 COPYRIGHT
  622. Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
  623. Licensed under the Apache License 2.0 (the "License"). You may not use
  624. this file except in compliance with the License. You can obtain a copy
  625. in the file LICENSE in the source distribution or at
  626. L<https://www.openssl.org/source/license.html>.
  627. =cut
  628. ### END MANUAL
  629. EOF