Simple script to take the release-parts of git flow and automate them for our components.
Creates a release branch from current HEAD.
release_create <path_to_repository>
Creates a new release branch from current HEAD. Should be run from develop.
Steps:
- Prompts for an updated version number (e.g.
0.2.0
) - Prompts for a release name (must be git ref "safe", e.g.
first-release
) - Reformats
release_notes.md
with a new header containing release details - Creates a new branch (e.g.
release/0.2.0-first-release
) - Commits all changes with a suitable message
release_package <path_to_repository>
Performs merges and tagging to update master with the latest version
- Update
master
from origin - Merge release branch into
master
- Push
master
- Tags
master
in the format<version><name>
- Push tags
- Creates a new GitHub release with the latest release notes in the body
- Merges
develop
into release branch and pushes to allow CI to finish
release_merge <path_to_repository>
Performs final merge of release branch into develop
and cleans up release branches
- Merges release branch into
develop
through GitHub API - Deletes remote release branch
- Deletes local release branch
Protected develop
branch. Unprotected master
A valid GitHub Personal Access Token must be available from gitcredentials
or in the environment variable $GITHUB_TOKEN
.
version
- containing the current version numberrelease_notes.md
- Containing up to date release notes with the latest changes in the format:
### Features
* [..]
### Fixes
* [..]
- - -
- Provide hooks to different backing-stores for the version number (perhaps by overriding the bash function
- Add support for protected master branch (push release, merge with GH API)