Replace x.x.x with a semver version like 3.3.0
Merge the develop branch to master:
$ git checkout master
$ git merge develop
Create a branch for the new version.
$ git checkout -b release/x.x.x master
Quality Assurance checks
- Check that there is not an empty stub or unreleased maintenance version in the
CHANGELOG.md. For empty stubs, just remove the full entry; for an unreleased
maintenance version, merge the entries with those for the new minor or major
release.
- Update the
branch-alias section of the composer.json to bump the
dev-master and dev-develop releases. As an example, if you are preparing a
new 3.3.0 release, dev-master would now read 3.3.x-dev and dev-develop would
read 3.4.x-dev. For a new major version 4.0.0, these would become 4.0.x-dev
and 4.1.x-dev, respectively.
Update the release date and commit the changes.
$ keep-a-changelog version:ready
$ git commit -sam "chore: prepare release x.x.x"
Merge the release branch into master and tag the release.
$ git checkout master
$ git merge --no-ff release/x.x.x
$ git push upstream master:master
$ keep-a-changelog version:tag x.x.x
$ keep-a-changelog version:release --remote upstream x.x.x
Merge to the develop branch.
$ git checkout develop
$ git merge --no-ff release/x.x.x
Create a CHANGELOG stub for the next minor version.
$ git checkout -b version/bump master
$ keep-a-changelog bump:bugfix
$ git commit -sam "chore: bumped version to x.x.x"
$ git checkout master && git merge --no-ff -m "docs: bumped version" version/bump
$ git checkout develop && git merge --no-ff -m "docs: bumped master version" version/bump
$ git branch -d version/bump
Create a CHANGELOG stub for the next develop version.
$ git checkout -b version/bump master
$ keep-a-changelog bump:minor
$ git commit -sam "chore: bumped version to x.x.x"
$ git checkout develop && git merge --no-ff -m "docs: bumped develop version" version/bump
$ git branch -d version/bump
Push the two branches and the new tag:
$ git push upstream master:master && git push upstream develop:develop
Finally, remove your temporary branches:
$ git branch -d version/bump release/x.x.x