Ergo (έργο), greek name for work, is a list of utilities for the daily release workflow.
$ curl -L https://github.com/beatlabs/ergo/releases/download/v0.7.1/ergo-0.7.1-darwin-amd64 --output ergo && chmod +x ergo && mv ergo /usr/local/bin/ergo
Usage:
ergo [flags]
ergo [command]
Available Commands:
deploy Deploy base branch to target branches
draft Create a draft release [github]
help Help about any command
status the status of branches compared to base branch
tag Create a tag on branch
version the version of ergo
Flags:
--base string Base branch for the comparison.
--branches string Comma separated list of branches
-h, --help help for ergo
--owner string
--path string Location to store or retrieve from the repo (default ".")
--repo string
Getting the status of remote repo branches compared to a base branch.
ergo status \
--owner dbaltas \
--repo ergo \
--base master \
--branches stable,testsuite/baseNew,testsuite/base,testsuite/featureA,testsuite/featureB,testsuite/featureC
Create a draft release having description of the commit diff. It will try to increment the last found tag version.
ergo draft \
--owner dbaltas \
--repo ergo \
--base master \
--branches release-gr,release-it
Push the release tag into the release branches (and update the release body accordingly). You need to have published the draft release first.
ergo deploy \
--owner dbaltas \
--repo ergo \
--releaseInterval 15m \
--branches release-pe,release-mx,release-co,release-cl,release-gr
If you don't want a linear release interval, for example you want more time between the first and second deployment, you can specify multiple release intervals.
ergo deploy \
--owner dbaltas \
--repo ergo \
--releaseInterval 15m,5m,5m,5m \
--branches release-pe,release-mx,release-co,release-cl,release-gr
Each release will add the next interval, and starts reading the list from the beginning in case releaseInterval list is shorter than the number of branches.
Branch Start Time
release-pe 12:59 CEST
release-mx 13:14 CEST
release-co 13:19 CEST
release-cl 13:24 CEST
release-gr 13:29 CEST
Deployment? [y/N]:
To communicate with github you will need a personal access token added on the configuration file as access-token
on github
Configuration is read from $HOME/.ergo.yaml
You have to use this in order to:
- Add your github access token
- Provide ergo with defaults. In the CLI commands you may skip some of the parameters in case that there are defaults values set.
- Information about the draft release body and what will change at the time of the release.
In order to release a new version of Ergo, execute the following steps:
- Create a new release and publish it
- Execute
make release
- Edit the created release and add the content of the
dist
folder - Point the README download URL to the latest version