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:
gitnvm: https://github.com/nvm-sh/nvmconvert(part of https://imagemagick.org/)git flow: https://github.com/petervanderdoes/gitflow-avh (Homebrew)gpggnu-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.2This will release a new version
1.2.0based on the code in thedevelopbranch. -
Security release:
bin/build.sh 1.1.2 1.1.1 hotfixThis will release a new version
1.1.2based on the code in themasterbranch.
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).