-
Notifications
You must be signed in to change notification settings - Fork 260
How do we deploy this thing?
This repo is set to automatically deploy to Heroku. Any time there is a merge into develop, the develop branch will be deployed to staging.refugerestrooms.org. Any time there is a merge into master, the master branch will be released to refugerestrooms.org
When making a release, you should do the following:
-
Check the latest releases on github.
-
Create a new branch
release-x.y.z
(replace "x.y.z" with the actual version) based ondevelop
.How to do this on GitHub.com (click to expand).
Click the branch switcher button on the RefugeRestrooms repo's main page here on GitHub.com, then type "release-x.y.x" with the "x.y.z" replaced by whatever version you are actually planning to release. Then click "Create branch: release-x.y.z from 'develop'", or hit the "Enter"/"Return" key.
-
Create (start editing) a new pull request from the
release-x.y.z
branch againstmaster
branch. -
Label the Pull Request "Release" and Title it "Release x.y.z" where 'x.y.z' is incremented from the most recent release.
-
Pull
develop
branch locally; rungit shortlog [previous-release-tag-here]..HEAD
- Changelogs can get a little weird depending on which branches merged into which other branches... Please look over this info and make sure it matches what really changed. If not, it's good to look up what actually changed and edit this changelog until it actually matches what happened since the last release.
-
Copy the result of step 5 into the body of the pull request.
-
Open the Pull Request.
-
If the PR "cannot be merged automatically" into
master
(meaning there are merge conflicts), mergemaster
branch into this PR'srelease-x.y.z
branch with the "Update branch" button at the bottom of the Pull Request page.- (You may need to resolve merge conflicts manually on the command-line, or using some more-advanced tool than GitHub.com, if the button is grayed out/not working. More-advanced or more-complicated merge conflicts cause this.)
-
Double-check that the site still is still working as intended on Heroku Staging (https://staging.refugerestrooms.org).
- (Optionally, to test that merging from
master
worked okay, push the PR branch to your own personal Heroku account for testing.)
- Once verified, merge the pull request with the "Squash and merge" option.
-
master
branch automatically deploys to Heroku. The update should be live soon at https://refugerestrooms.org. - There will be many unrelated commit showing as part of this PR, due to how we handle the
develop
andmaster
branches at the moment. Please delete all of these from the commit message GitHub suggests, and only include commits that are actually new since the last release in the commit message.
-
- Go back to github releases and create a new release from
develop
, with the new version number. Copy the body of the pull request into the Release Notes. - Save the release.
- Check the latest releases on github.
- Open a new pull request from develop against master.
- Label the Pull Request "Release" and Title it "Release x.x.x" where 'x.x.x' is incremented from the most recent release.
- Pull both develop and master locally; run
git shortlog --grep "Merge pull request #" %{previous release}..HEAD
- Copy the result of 4, into the body of the pull request.
- Open the Pull Request.
- Once CI has passed, deploy to Heroku Staging.
- Once verified, merge the pull request and deploy master to Heroku.
- Go back to github releases and create a new release from master, with the new version number. Copy the body of the pull request into the Release Notes.
- Save the release.
Note: @mi-wood and @tkwidmer both have heroku privileges, and can do the deploys for you. You can hit us up on slack.