Skip to content
Snippets Groups Projects

CiviCRM v5.x.x: Publish a patch release (non-security)

Prerequisites

See Prerequisites

1A: Repo updates (PR flow; typical)

Prepare patches for the 5.X branch via PR.

In tandem with the PRs, prepare the draft release notes.

After all the substantive PRs have been merged, prepare a new PR to bump-up the version number and copy-in the release-notes:

cd ~/src/master
git checkout origin/5.X -b 5.X-bumpY

# Set the final version to `5.X.Y`
cat xml/version.xml
./tools/bin/scripts/set-version.php 5.X.Y --commit

# Add the release notes
vi release-notes.md release-notes/5.X.Y.md
git add release-notes.md release-notes/5.X.Y.md
git commit

Submit 5.X-bumpY as a new PR.

Use the Github GUI for final copy-editing of the notes.

1B: Repo updates (Abridged flow)

Plan the patchset and generate release notes. Then update the corresponding 5.X branch:

cd ~/src/master
git checkout 5.X

# Cherry-pick any patches
git cherry-pick abcd1234abcd1234 
git push origin 5.X

# Set the final version to `5.X.Y`
cat xml/version.xml
./tools/bin/scripts/set-version.php 5.X.Y --commit

# Add the release notes
vi release-notes.md release-notes/5.X.Y.md
git add release-notes.md release-notes/5.X.Y.md
git commit

# Push
git push origin 5.X

2: Sanity checks

3: Prepare and identify the final tarballs

In Jenkins, ensure that the final tarballs have been prepared. Run the job manually if you're impatient.

After running, determine the identity of the final build:

gsutil ls gs://civicrm-build/5.2/*json

For example, we might pick gs://civicrm-build/5.2/civicrm-5.2.1-201705030600.json.

4: Publish

You can do the full process in one command:

cd ~/src/master
releaser -v gs://civicrm-build/5.2/civicrm-5.2.1-201705030600.json get sign tag publish

or do the steps individually:

cd ~/src/master

## Download and rename the RC tarballs
releaser -v gs://civicrm-build/5.2/civicrm-5.2.1-201705030600.json get

## Generate signatures for tarballs
releaser -v gs://civicrm-build/5.2/civicrm-5.2.1-201705030600.json sign

## Generate tags in each repo (dry run)
releaser -v gs://civicrm-build/5.2/civicrm-5.2.1-201705030600.json tag -N

## Publish tarballs to Sourceforge and Gcloud (dry run)
releaser -v gs://civicrm-build/5.2/civicrm-5.2.1-201705030600.json publish -N

## Generate tags in each repo (really)
releaser -v gs://civicrm-build/5.2/civicrm-5.2.1-201705030600.json tag -f

## Publish tarballs to Sourceforge and Gcloud (really)
releaser -v gs://civicrm-build/5.2/civicrm-5.2.1-201705030600.json publish

To ensure the various tags were published and match the branches, use civi-git-table, as in:

civi-git-table --fetch 5.16.0 5.16.1 5.16

5: Update versions.json

Services such as the civicrm.org download page and the in-app version check depend on a file named versions.json. Update this.

## Find and examine the current list of releases.
pushd /var/www/latest.civicrm.org/public/
ls -la versions.json
./bin/pb release:list

## Add the new release. Below are a few examples. Be sure to adjust details.
./bin/pb release:add 5.2.1
./bin/pb release:add 5.2.2 --date=2018-05-03 --message="Fix regression in the Foo and Bar widgets"

Preview the upgrade messages that will be displayed on various versions. This example previews the perspective from 5.0.2 and 5.8.0 (adjust to taste):

http://latest.civicrm.org/stable.php?format=devPreview&versions=5.0.2,5.8.0

Finally:

## Make the change persistent.
git commit versions.json
git push origin master

And

popd

6: Make new versions visible on download sites

Log into https://civicrm.org/user and clear the page-cache in https://civicrm.org/admin/config/development/performance

Browse https://sourceforge.net/projects/civicrm/files/civicrm-stable - confirm that:

  • The new upload is present.
  • The new civicrm-X.Y.Z-drupal.tar.gz is the default download.

Note that it may take some time to reflect default download on sf.net.