release.sh 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740
  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. # Initialize #########################################################
  204. echo "== Initializing work tree"
  205. get_version
  206. # Generate a cloned directory name
  207. clone_branch="openssl-$SERIES.x"
  208. release_clone="$clone_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" . "$release_clone"
  214. fi
  215. cd "$release_clone"
  216. get_version
  217. current_branch="$(git rev-parse --abbrev-ref HEAD)"
  218. new_branch="openssl-$SERIES.x"
  219. # Check that we're still on the same branch, or on a release branch
  220. if [ "$current_branch" = "$orig_branch" ]; then
  221. :
  222. elif [ "$current_branch" = "$new_branch" ]; then
  223. :
  224. else
  225. echo >&2 "The cloned sub-directory '$release_clone' is on a branch"
  226. echo >&2 "other than '$current_branch' or '$new_branch'"
  227. echo >&2 "Please 'cd \"$(pwd)\"; git checkout $current_branch'"
  228. exit 1
  229. fi
  230. if $do_branch; then
  231. if [ "$current_branch" = "$new_branch" ]; then
  232. do_branch=false
  233. fi
  234. if ! $do_branch && $warn_branch; then
  235. echo >&2 "Warning: --branch ignored, we're already in a release branch"
  236. fi
  237. fi
  238. SOURCEDIR=$(pwd)
  239. $DEBUG >&2 "DEBUG: Source directory is $SOURCEDIR"
  240. # Release ############################################################
  241. # We always expect to start from a state of development
  242. if [ "$TYPE" != 'dev' ]; then
  243. echo >&2 "Not in a development branch"
  244. echo >&2 "Have a look at the git log in $release_clone, it may be that"
  245. echo >&2 "a previous crash left it in an intermediate state and that"
  246. echo >&2 "need to drop the top commit:"
  247. echo >&2 ""
  248. echo >&2 "(cd $release_clone; git reset --hard HEAD^)"
  249. echo >&2 "# WARNING! LOOK BEFORE YOU ACT"
  250. exit 1
  251. fi
  252. # We only create a release branch if the patch number is zero
  253. if [ $PATCH -ne 0 ]; then
  254. if $do_branch; then
  255. echo >&2 "Warning! We're already in a release branch; --branch ignored"
  256. fi
  257. do_branch=false
  258. fi
  259. # Update the version information. This won't save anything anywhere, yet,
  260. # but does check for possible next_method errors before we do bigger work.
  261. next_release_state "$next_method"
  262. if $do_branch; then
  263. $VERBOSE "== Creating a release branch: $new_branch"
  264. git checkout $git_quiet -b "$new_branch"
  265. fi
  266. echo "== Configuring OpenSSL for update and release. This may take a bit of time"
  267. ./Configure cc >&42
  268. $VERBOSE "== Checking source file updates"
  269. make update >&42
  270. if [ -n "$(git status --porcelain)" ]; then
  271. $VERBOSE "== Committing updates"
  272. git add -u
  273. git commit $git_quiet -m 'make update'
  274. if [ -n "$reviewers" ]; then
  275. addrev --nopr $reviewers
  276. fi
  277. fi
  278. # Write the version information we updated
  279. set_version
  280. if [ -n "$PRE_LABEL" ]; then
  281. release="$VERSION-$PRE_RELEASE_TAG$BUILD_METADATA"
  282. release_text="$SERIES$BUILD_METADATA $PRE_LABEL $PRE_NUM"
  283. announce_template=openssl-announce-pre-release.tmpl
  284. else
  285. release="$VERSION$BUILD_METADATA"
  286. release_text="$release"
  287. announce_template=openssl-announce-release.tmpl
  288. fi
  289. tag="openssl-$release"
  290. $VERBOSE "== Updated version information to $release"
  291. $VERBOSE "== Updating files with release date for $release : $RELEASE_DATE"
  292. for fixup in "$HERE/dev/release-aux"/fixup-*-release.pl; do
  293. file="$(basename "$fixup" | sed -e 's|^fixup-||' -e 's|-release\.pl$||')"
  294. $VERBOSE "> $file"
  295. RELEASE="$release" RELEASE_TEXT="$release_text" RELEASE_DATE="$RELEASE_DATE" \
  296. perl -pi $fixup $file
  297. done
  298. $VERBOSE "== Comitting updates and tagging"
  299. git add -u
  300. git commit $git_quiet -m "Prepare for release of $release_text"
  301. if [ -n "$reviewers" ]; then
  302. addrev --nopr $reviewers
  303. fi
  304. echo "Tagging release with tag $tag. You may need to enter a pass phrase"
  305. git tag$tagkey "$tag" -m "OpenSSL $release release tag"
  306. tarfile=openssl-$release.tar
  307. tgzfile=$tarfile.gz
  308. announce=openssl-$release.txt
  309. echo "== Generating tar, hash and announcement files. This make take a bit of time"
  310. $VERBOSE "== Making tarfile: $tgzfile"
  311. # Unfortunately, util/mktar.sh does verbose output on STDERR... for good
  312. # reason, but it means we don't display errors unless --verbose
  313. ./util/mktar.sh --tarfile="../$tarfile" 2>&1 \
  314. | while read L; do $VERBOSE "> $L"; done
  315. if ! [ -f "../$tgzfile" ]; then
  316. echo >&2 "Where did the tarball end up? (../$tgzfile)"
  317. exit 1
  318. fi
  319. $VERBOSE "== Generating checksums: $tgzfile.sha1 $tgzfile.sha256"
  320. openssl sha1 < "../$tgzfile" | \
  321. (IFS='='; while read X H; do echo $H; done) > "../$tgzfile.sha1"
  322. openssl sha256 < "../$tgzfile" | \
  323. (IFS='='; while read X H; do echo $H; done) > "../$tgzfile.sha256"
  324. length=$(wc -c < "../$tgzfile")
  325. sha1hash=$(cat "../$tgzfile.sha1")
  326. sha256hash=$(cat "../$tgzfile.sha256")
  327. $VERBOSE "== Generating announcement text: $announce"
  328. # Hack the announcement template
  329. cat "$HERE/dev/release-aux/$announce_template" \
  330. | sed -e "s|\\\$release_text|$release_text|g" \
  331. -e "s|\\\$release|$release|g" \
  332. -e "s|\\\$series|$SERIES|g" \
  333. -e "s|\\\$label|$PRE_LABEL|g" \
  334. -e "s|\\\$tarfile|$tgzfile|" \
  335. -e "s|\\\$length|$length|" \
  336. -e "s|\\\$sha1hash|$sha1hash|" \
  337. -e "s|\\\$sha256hash|$sha256hash|" \
  338. | perl -p "$HERE/dev/release-aux/fix-title.pl" \
  339. > "../$announce"
  340. $VERBOSE "== Generating signatures: $tgzfile.asc $announce.asc"
  341. rm -f "../$tgzfile.asc" "../$announce.asc"
  342. echo "Signing the release files. You may need to enter a pass phrase"
  343. gpg$gpgkey --use-agent -sba "../$tgzfile"
  344. gpg$gpgkey --use-agent -sta --clearsign "../$announce"
  345. # We finish off by resetting all files, so we don't have to update
  346. # files with release dates again
  347. $VERBOSE "== Reset all files to their pre-commit contents"
  348. git reset $git_quiet HEAD^ -- .
  349. git checkout -- .
  350. if $do_upload; then
  351. (
  352. if [ "$VERBOSE" != ':' ]; then
  353. echo "progress"
  354. fi
  355. echo "put ../$tgzfile"
  356. echo "put ../$tgzfile.sha1"
  357. echo "put ../$tgzfile.sha256"
  358. echo "put ../$tgzfile.asc"
  359. echo "put ../$announce.asc"
  360. ) \
  361. | sftp "$upload_address"
  362. fi
  363. # Post-release #######################################################
  364. prev_release_text="$release_text"
  365. prev_release_date="$RELEASE_DATE"
  366. next_release_state "$next_method2"
  367. set_version
  368. release="$VERSION-$PRE_RELEASE_TAG$BUILD_METADATA"
  369. release_text="$VERSION$BUILD_METADATA"
  370. if [ -n "$PRE_LABEL" ]; then
  371. release_text="$SERIES$BUILD_METADATA $PRE_LABEL $PRE_NUM"
  372. fi
  373. $VERBOSE "== Updated version information to $release"
  374. $VERBOSE "== Updating files for $release :"
  375. for fixup in "$HERE/dev/release-aux"/fixup-*-postrelease.pl; do
  376. file="$(basename "$fixup" | sed -e 's|^fixup-||' -e 's|-postrelease\.pl$||')"
  377. $VERBOSE "> $file"
  378. RELEASE="$release" RELEASE_TEXT="$release_text" \
  379. PREV_RELEASE_TEXT="$prev_release_text" \
  380. PREV_RELEASE_DATE="$prev_release_date" \
  381. perl -pi $fixup $file
  382. done
  383. $VERBOSE "== Comitting updates"
  384. git add -u
  385. git commit $git_quiet -m "Prepare for $release_text"
  386. if [ -n "$reviewers" ]; then
  387. addrev --nopr $reviewers
  388. fi
  389. if $do_branch; then
  390. $VERBOSE "== Going back to the main branch $current_branch"
  391. git checkout $git_quiet "$current_branch"
  392. get_version
  393. next_release_state "minor"
  394. set_version
  395. release="$VERSION-$PRE_RELEASE_TAG$BUILD_METADATA"
  396. release_text="$SERIES$BUILD_METADATA"
  397. $VERBOSE "== Updated version information to $release"
  398. $VERBOSE "== Updating files for $release :"
  399. for fixup in "$HERE/dev/release-aux"/fixup-*-postrelease.pl; do
  400. file="$(basename "$fixup" | sed -e 's|^fixup-||' -e 's|-postrelease\.pl$||')"
  401. $VERBOSE "> $file"
  402. RELEASE="$release" RELEASE_TEXT="$release_text" \
  403. perl -pi $fixup $file
  404. done
  405. $VERBOSE "== Comitting updates"
  406. git add -u
  407. git commit $git_quiet -m "Prepare for $release_text"
  408. if [ -n "$reviewers" ]; then
  409. addrev --nopr $reviewers
  410. fi
  411. fi
  412. # Done ###############################################################
  413. $VERBOSE "== Done"
  414. cat <<EOF
  415. ======================================================================
  416. The release is done, and involves a few commits for you to deal with.
  417. It has all been done in a clone of this workspace, see details below.
  418. EOF
  419. if $do_branch; then
  420. cat <<EOF
  421. Additionally, a release branch has been created for you, so you need
  422. to look for new commits in two places.
  423. EOF
  424. fi
  425. if $do_release; then
  426. cat <<EOF
  427. These files were uploaded to $upload_address:
  428. ../$tgzfile
  429. ../$tgzfile.sha1
  430. ../$tgzfile.sha256
  431. ../$tgzfile.asc
  432. ../$announce.asc
  433. EOF
  434. fi
  435. cat <<EOF
  436. Release worktree: $release_clone
  437. EOF
  438. if [ "$current_branch" != "$new_branch" ]; then
  439. cat <<EOF
  440. Current branch: $current_branch
  441. EOF
  442. fi
  443. if $do_branch; then
  444. cat <<EOF
  445. New release branch: $new_branch
  446. EOF
  447. fi
  448. cat <<EOF
  449. ======================================================================
  450. EOF
  451. cat <<EOF
  452. If something went wrong and you want to start over, all you need is to
  453. remove the release worktree:
  454. rm -rf $release_clone
  455. If a tarball was uploaded, you must also clean that away, or ask you
  456. kind OpenSSL sysadmin to do so.
  457. EOF
  458. exit 0
  459. # cat is inconsequential, it's only there to fend off zealous shell parsers
  460. # that parse all the way here.
  461. cat <<EOF
  462. ### BEGIN MANUAL
  463. =pod
  464. =head1 NAME
  465. release.sh - OpenSSL release script
  466. =head1 SYNOPSIS
  467. B<release.sh>
  468. [
  469. B<--alpha> |
  470. B<--next-beta> |
  471. B<--beta> |
  472. B<--final> |
  473. B<--branch> |
  474. B<--local-user>=I<keyid> |
  475. B<--reviewer>=I<id> |
  476. B<--no-upload> |
  477. B<--no-update> |
  478. B<--verbose> |
  479. B<--debug> |
  480. B<--help> |
  481. B<--manual>
  482. ]
  483. =head1 DESCRIPTION
  484. B<release.sh> creates an OpenSSL release, given current worktree conditions.
  485. It will refuse to work unless the current branch is C<master> or a release
  486. branch (see L</RELEASE BRANCHES AND TAGS> below for a discussion on those).
  487. B<release.sh> tries to be smart and figure out the next release if no hints
  488. are given through options, and will exit with an error in ambiguous cases.
  489. B<release.sh> always clones the current workspace into a sub-directory
  490. named C<< openssl-I<SERIES>-tmp >>, where C<< I<SERIES> >> is taken from
  491. the available version information in the source.
  492. =head1 OPTIONS
  493. =over 4
  494. =item B<--alpha>, B<--beta>
  495. Set the state of this branch to indicate that alpha or beta releases are
  496. to be done.
  497. B<--alpha> is only acceptable if the I<PATCH> version number is zero and
  498. the current state is "in development" or that alpha releases are ongoing.
  499. B<--beta> is only acceptable if the I<PATCH> version number is zero and
  500. that alpha or beta releases are ongoing.
  501. =item B<--next-beta>
  502. Use together with B<--alpha> to switch to beta releases after the current
  503. release is done.
  504. =item B<--final>
  505. Set the state of this branch to indicate that regular releases are to be
  506. done. This is only valid if alpha or beta releases are currently ongoing.
  507. This implies B<--branch>.
  508. =item B<--branch>
  509. Create a branch specific for the I<SERIES>.x release series, if it doesn't
  510. already exist, and switch to it. The exact branch name will be
  511. C<< openssl-I<SERIES>.x >>.
  512. =item B<--no-upload>
  513. Don't upload the produced files.
  514. =item B<--no-update>
  515. Don't run C<make update>.
  516. =item B<--verbose>
  517. Verbose output.
  518. =item B<--debug>
  519. Display extra debug output. Implies B<--no-upload>
  520. =item B<--local-user>=I<keyid>
  521. Use I<keyid> as the local user for C<git tag> and for signing with C<gpg>.
  522. If not given, then the default e-mail address' key is used.
  523. =item B<--reviewer>=I<id>
  524. Add I<id> to the set of reviewers for the commits performed by this script.
  525. Multiple reviewers are allowed.
  526. If no reviewer is given, you will have to run C<addrev> manually, which
  527. means retagging a release commit manually as well.
  528. =item B<--force>
  529. Force execution. Precisely, the check that the current branch is C<master>
  530. or a release branch is not done.
  531. =item B<--help>
  532. Display a quick help text and exit.
  533. =item B<--manual>
  534. Display this manual and exit.
  535. =back
  536. =head1 RELEASE BRANCHES AND TAGS
  537. Prior to OpenSSL 3.0, the release branches were named
  538. C<< OpenSSL_I<SERIES>-stable >>, and the release tags were named
  539. C<< OpenSSL_I<VERSION> >> for regular releases, or
  540. C<< OpenSSL_I<VERSION>-preI<n> >> for pre-releases.
  541. From OpenSSL 3.0 ongoing, the release branches are named
  542. C<< openssl-I<SERIES>.x >>, and the release tags are named
  543. C<< openssl-I<VERSION> >> for regular releases, or
  544. C<< openssl-I<VERSION>-alphaI<n> >> for alpha releases
  545. and C<< openssl-I<VERSION>-betaI<n> >> for beta releases.
  546. B<release.sh> recognises both forms.
  547. =head1 VERSION AND STATE
  548. With OpenSSL 3.0, all the version and state information is in the file
  549. F<VERSION.dat>, where the following variables are used and changed:
  550. =over 4
  551. =item B<MAJOR>, B<MINOR>, B<PATCH>
  552. The three part of the version number.
  553. =item B<PRE_RELEASE_TAG>
  554. The indicator of the current state of the branch. The value may be one pf:
  555. =over 4
  556. =item C<dev>
  557. This branch is "in development". This is typical for the C<master> branch
  558. unless there are ongoing alpha or beta releases.
  559. =item C<< alphaI<n> >> or C<< alphaI<n>-dev >>
  560. This branch has alpha releases going on. C<< alphaI<n>-dev >> is what
  561. should normally be seen in the git workspace, indicating that
  562. C<< alphaI<n> >> is in development. C<< alphaI<n> >> is what should be
  563. found in the alpha release tar file.
  564. =item C<< alphaI<n> >> or C<< alphaI<n>-dev >>
  565. This branch has beta releases going on. The details are otherwise exactly
  566. as for alpha.
  567. =item I<no value>
  568. This is normally not seen in the git workspace, but should always be what's
  569. found in the tar file of a regular release.
  570. =back
  571. =item B<RELEASE_DATE>
  572. This is normally empty in the git workspace, but should always have the
  573. release date in the tar file of any release.
  574. =back
  575. =head1 COPYRIGHT
  576. Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
  577. Licensed under the Apache License 2.0 (the "License"). You may not use
  578. this file except in compliance with the License. You can obtain a copy
  579. in the file LICENSE in the source distribution or at
  580. L<https://www.openssl.org/source/license.html>.
  581. =cut
  582. ### END MANUAL
  583. EOF