Skip to content
Snippets Groups Projects
5.x-patch.md 3.84 KiB
Newer Older
  • Learn to ignore specific revisions
  • totten's avatar
    totten committed
    # CiviCRM v5.x.x: Publish a patch release (non-security)
    
    
    ## Prerequisites
    
    See [Prerequisites](any-prereq.md)
    
    ## 1: (If you haven't already) Set the final version to `5.X.Y`
    
    ```bash
    cd ~/src/master
    git checkout 5.X
    git pull --ff-only origin 5.X
    ./tools/bin/scripts/set-version.php 5.X.Y --commit
    git push origin 5.X
    ```
    
    ## 2: (If you haven't already) Backport patches to `5.X` branch
    
    e.g.
    
    ```bash
    cd ~/src/master
    git checkout 5.X
    git cherry-pick abcd1234abcd1234 
    git push origin 5.X
    ```
    
    
    * Check open PRs for `5.X`: https://github.com/civicrm/civicrm-core/pulls
    
    * Check release notes: https://github.com/civicrm/civicrm-core/blob/5.X/release-notes.md
    
    * In Jenkins, review the scheduled tests for `5.X` and determine if anything should block the release.
        * https://test.civicrm.org/job/CiviCRM-Core-Matrix/
        * https://test.civicrm.org/job/CiviCRM-Ext-Matrix/
    
    totten's avatar
    totten committed
        * https://test.civicrm.org/job/CiviCRM-E2E-Matrix/
    
    totten's avatar
    totten committed
    * Compare the git revisions from:
    
    totten's avatar
    totten committed
        * Current git repos: `civi-git-table --fetch 5.X.Y 5.X`
    
    totten's avatar
    totten committed
        * Draft tarball: https://download.civicrm.org/latest/branch/5.X/LATEST/civicrm-X.Y.Z-drupal-LATEST.tar.gz/inspect
    
    totten's avatar
    totten committed
    
    ## 4: Prepare and identify the final tarballs
    
    
    In Jenkins, ensure that the final tarballs have been prepared. Run the job manually if you're impatient.
    
    
    totten's avatar
    totten committed
    * https://test.civicrm.org/job/CiviCRM-Publish/
    
    
    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`.
    
    
    totten's avatar
    totten committed
    ## 5: 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
    
    totten's avatar
    totten committed
    To ensure the various tags were published and match the branches, use `civi-git-table`, as in:
    
    totten's avatar
    totten committed
    ```
    civi-git-table --fetch 5.16.0 5.16.1 5.16
    ```
    
    totten's avatar
    totten committed
    ## 6: 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.
    
    totten's avatar
    totten committed
    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"
    
    totten's avatar
    totten committed
    ```
    
    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
    
    totten's avatar
    totten committed
    Finally:
    
    ```
    
    ## Make the change persistent.
    git commit versions.json
    git push origin master
    ```
    
    
    ## 7: Make new versions visible on download sites
    
    totten's avatar
    totten committed
    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`.