This script prepares most parts of a new ClassicPress release.
This script supports Linux and MacOS. To work with MacOS it is recommended to use
Homebrew and necessary to install gnu-sed
.
You'll need the following programs installed on your computer:
git
nvm
: https://github.com/nvm-sh/nvmconvert
(part of https://imagemagick.org/)git flow
: https://github.com/petervanderdoes/gitflow-avh (Homebrew)gpg
gnu-sed
: https://formulae.brew.sh/formula/gnu-sed (MacOS only)
Copy sample-config.sh
to config.sh
and fill in the values. In order to do
an official ClassicPress release, you'll need the correct key registered with
GPG on your computer.
Run bin/build.sh
. It will display usage information that indicates the
correct arguments, which include the current version number and the previous
version number. Security releases should also use the hotfix
argument to do
a hotfix release according to the
git flow
model,
and regular releases should not. For example:
-
Regular release:
bin/build.sh 1.2.0 1.1.2
This will release a new version
1.2.0
based on the code in thedevelop
branch. -
Security release:
bin/build.sh 1.1.2 1.1.1 hotfix
This will release a new version
1.1.2
based on the code in themaster
branch.
You will also need to either have SSH configured to the ClassicPress servers, or skip these steps by editing the "progress file" generated by the script.
The bin/build.sh
does a release step-by-step, and saves progress to a text
file like 1.1.2.progress
. This allows you to resume a release if a given step
fails or if you need to abort the process partway through.
There are three kinds of prompts that the script may emit:
-
[[release-banner]] $ convert ...
A prompt with
$
indicates that the script is going to run the command after the$
sign. Inspect the command for correctness and press Enter to run it. -
[[release-changelog-forums-draft]] > Prepare the release changelog on the forums: =
A prompt with
=
expects you to perform some action and input a result (in this case, the URL to the changelog post on the forums). -
[[dev-version-bump]] > update version to 1.1.3+dev and save (do not commit): > - in package.json (line 3) > - in src/wp-includes/version.php (line 30) >
A prompt with
>
expects you to perform some action and then press Enter (in this case, bumping the version number).