4.7 KiB
Building a Compose release
Prerequisites
The release scripts require the following tools installed on the host:
To get started with a new release
Create a branch, update version, and add release notes by running make-branch
./script/release/make-branch $VERSION [$BASE_VERSION]
$BASE_VERSION
will default to master. Use the last version tag for a bug fix
release.
As part of this script you'll be asked to:
-
Update the version in
compose/__init__.py
andscript/run/run.sh
.If the next release will be an RC, append
-rcN
, e.g.1.4.0-rc1
. -
Write release notes in
CHANGES.md
.Almost every feature enhancement should be mentioned, with the most visible/exciting ones first. Use descriptive sentences and give context where appropriate.
Bug fixes are worth mentioning if it's likely that they've affected lots of people, or if they were regressions in the previous version.
Improvements to the code are not worth mentioning.
-
Create a new repository on bintray. The name has to match the name of the branch (e.g.
bump-1.9.0
) and the type should be "Generic". Other fields can be left blank. -
Check that the
vnext-compose
branch on the docs repo has documentation for all the new additions in the upcoming release, and create a PR there for what needs to be amended.
When a PR is merged into master that we want in the release
-
Check out the bump branch and run the cherry pick script
git checkout bump-$VERSION ./script/release/cherry-pick-pr $PR_NUMBER
-
When you are done cherry-picking branches move the bump version commit to HEAD
./script/release/rebase-bump-commit git push --force $USERNAME bump-$VERSION
To release a version (whether RC or stable)
Check out the bump branch and run the build-binaries
script
git checkout bump-$VERSION
./script/release/build-binaries
When prompted build the non-linux binaries and test them.
-
Download the osx binary from Bintray. Make sure that the latest Travis build has finished, otherwise you'll be downloading an old binary.
-
Download the windows binary from AppVeyor
-
Draft a release from the tag on GitHub (the script will open the window for you)
The tag will only be present on Github when you run the
push-release
script in step 7, but you can pre-fill it at that point. -
Paste in installation instructions and release notes. Here's an example - change the Compose version and Docker version as appropriate:
If you're a Mac or Windows user, the best way to install Compose and keep it up-to-date is **[Docker for Mac and Windows](https://www.docker.com/products/docker)**. Note that Compose 1.9.0 requires Docker Engine 1.10.0 or later for version 2 of the Compose File format, and Docker Engine 1.9.1 or later for version 1. Docker for Mac and Windows will automatically install the latest version of Docker Engine for you. Alternatively, you can use the usual commands to install or upgrade Compose: ``` curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose ``` See the [install docs](https://docs.docker.com/compose/install/) for more install options and instructions. Here's what's new: ...release notes go here...
-
Attach the binaries and
script/run/run.sh
-
Add "Thanks" with a list of contributors. The contributor list can be generated by running
./script/release/contributors
. -
If everything looks good, it's time to push the release.
./script/release/push-release
-
Merge the bump PR.
-
Publish the release on GitHub.
-
Check that all the binaries download (following the install instructions) and run.
-
Email maintainers@dockerproject.org and engineering@docker.com about the new release.
If it’s a stable release (not an RC)
- Close the release’s milestone.
If it’s a minor release (1.x.0), rather than a patch release (1.x.y)
-
Open a PR against
master
to:- update
CHANGELOG.md
to bring it in line withrelease
- bump the version in
compose/__init__.py
to the next minor version number withdev
appended. For example, if you just released1.4.0
, update it to1.5.0dev
.
- update
-
Get the PR merged.
Finally
- Celebrate, however you’d like.