Commit c711c89c authored by Nedjo Rogers's avatar Nedjo Rogers
Browse files

Update issuing-new-release-of-features-and-distribution.md

parent 678f145b
Loading
Loading
Loading
Loading
+41 −15
Changes for issuing-new-release-of-features-and-distribution.md: 41 added lines, 15 removed lines.
Original line number Diff line number Diff line
@@ -2,16 +2,26 @@

Here are the steps for issuing a new release of Drutopia's main distro.  Other Drutopia-based distributions should work similarly.

### Issue new feature module releases as needed
## Set up hackysync

We need new releases of any feature that has had changes made.
To be able to push changes either for feature modules or the distribution, we use a set of scripts called hackysync. See the [`README`](https://gitlab.com/drutopia/hackysync/blob/master/README.md) in the [`hackysync`](https://gitlab.com/drutopia/hackysync) repo.

Once you've cloned the repository, run some setup before doing either feature module or distribution updates:

* Ensure updates for all projects are pushed to GitLab and drupal.org (and are up-to-date on your local).  See the [readme](https://gitlab.com/drutopia/hackysync/blob/master/README.md) in the [hackysync](https://gitlab.com/drutopia/hackysync) repo.
* Determine which, if any, Drutopia feature project has changes since the last release:
    ```
    cd hackysync
    git pull
    ./get_all_repositories.sh
    ```

## Issue new feature module releases if needed

We need new releases of any feature that has had changes made.

* Ensure updates for all projects are pushed to GitLab and drupal.org (and are up-to-date on your local).
* Determine which, if any, Drutopia feature project has changes since the last release:
    ```
    cd hackysync
    ./update_drupal_org_from_gitlab.sh
    ./commits-since-most-recent-tag.sh
    ```
@@ -24,35 +34,51 @@ We need new releases of any feature that has had changes made.
* Update `drutopia/composer.json` requirements so that each Drutopia project references the latest release.  Get an overview of current releases with `./current-tags.sh`.  (This isn't necessary technically but is hugely useful in understanding what has changed between releases.)
* Paste the results of the automated check of changes since last stable release (from above, don't re-run) into https://gitlab.com/drutopia/documentation/edit/master/drutopia-releases.md 

### Refresh pinned dependency versions
## Issue a new release of the distribution

If you only want to update the distribution, for example, for a security release of a contributed module or Drupal core, start here.

### Update pinned dependency versions

We include a file in the install profile that records the specific versions of all Drupal projects included in a release. Prior to posting a release, we need to update this file.
We include a file in the install profile that records the specific versions of all Drupal projects included in a release. Prior to posting a release, we need to update this file. By doing so, we make sure that anyone who installs the release can make sure they have exactly the same versions of all Drupal code as the ones we tested.

* Generate the full code base:
    * `composer create-project drutopia/drutopia_template:dev-master --no-interaction my-drutopia-test`
    * Start in a directory where you can install a website. If you're developing locally, this might be `/var/www/html`.
    * Run `composer create-project drutopia/drutopia_template:dev-master --no-interaction my-drutopia-test`
    * `cd my-drutopia-test`
    * Then run `composer require drutopia/drutopia:dev-8.x-1.x` to get the current dev version
* Run composer command to list all Drupal projects in the version actually installed
    * Then run `composer require drutopia/drutopia:dev-8.x-1.x` to get the current dev version of the `drutopia` install profile.
* Run a composer command to list all Drupal projects in the version actually installed
    * `composer show drupal/*`
* Copy the result into the file in the install profile as `bin/drutopia-tested-global-pinnings.sh`, replacing the previous contents of that file.
* Commit the result.
* Copy the result into the file in the `drutopia` install profile as `bin/drutopia-tested-global-pinnings.sh`, replacing the previous contents of that file. You'll find this file at `my-drutopia-test/web/profiles/contrib/drutopia/bin/drutopia-tested-global-pinnings.sh`
* Don't yet commit the results. We need to test first.

### Test

* Install a fresh Drutopia site using the code base you generated in the previous step.
* Test.
* If testing is successful, commit the change to `bin/drutopia-tested-global-pinnings.sh` in the `drutopia` install profile.
    * Start in `my-drutopia-test`
    * `cd web/profiles/contrib/drutopia`
    * `git add .` or `git add -u`
    * `git commit -m "Update pinnings to latest stable releases"` or a similar message as appropriate

### Set release version

* Edit the install profile's `.info.yml` file to specify the version string for the release you're about to post.
* Edit the `drutopia` install profile's `.info.yml` file to specify the version string for the release you're about to post.
* Commit.

### Push changes

Push latest changes to install profile to drupal.org, either manually or via hackysync.
Push latest changes to install profile to drupal.org using the hackysync scripts.

If you have not already, do the `hackysync` setup listed above.

Then:

* To do manually, ensure you have a remote set for the drupal.org repository for the install profile project. For example, if your drupal.org remote is called drupal, do:
    * `git push drupal 8.x-1.x`
     ```
    cd hackysync
    ./update_drupal_org_from_gitlab.sh
    ```

### Issue a release of the Drutopia distribution