Improvements for the release instructions

Alfonso Acosta
2016-04-14 14:10:53 +00:00
parent 852e1cca9e
commit 451505e649
+12 -9
@@ -29,6 +29,12 @@ First, get the latest tools.
`$ git checkout -b release-0.1`
NB don't include patch versions in the branch name - successive patch versions for a given minor will be released of the same branch.
(i.e. name your branch `release-0.1` and not `relase-0.1.0`)
## Get a GitHub token
If you don't have one already, go to https://github.com/settings/tokens/new
and make one with a funny name, and the **public_repo** scope only. (I think.)
## Update the CHANGELOG and test
@@ -36,17 +42,18 @@ See https://github.com/weaveworks/scope/compare/latest_release...master for a di
A starting point for the CHANGELOG entry for this release can be obtained by running a little CLI-fu. (Make sure to have `jq` installed for JSON processing.):
```
# set github token
export GITHUB_TOKEN=xxx
# update latest_release tag in local clone
git fetch -t origin
# get merged PR titles
git log --oneline latest_release...master | grep "Merge pull request"\
git log --oneline latest_release...HEAD | grep "Merge pull request"\
| awk '{issue=substr($5, 2)} \
{system("curl -s https://api.github.com/repos/weaveworks/scope/issues/" issue "| jq \".title\"")} \
{system("curl -s https://api.github.com/repos/weaveworks/scope/issues/" issue "'"?access_token=$GITHUB_TOKEN"' | jq \".title\"")} \
{print "\t["$5"](https://github.com/weaveworks/scope/pull/" issue ")"}'\
| sed -e 's/^"/- /' | sed -e 's/"$//'
```
(If you were rate-limited, generate a GH access token and append it to the curl URL as `?access_token=TOKEN`.)
Then sort the lines by feature, bug fix, performance etc. sections.
You may find it helpful to look at the original issues of the PRs to see what they are about.
Commit and push the CHANGELOG to the release branch.
@@ -72,11 +79,7 @@ $ bin/release build
## bin/release draft
This sets some stuff up on GitHub, so you need a GitHub token.
If you don't have one already, go to https://github.com/settings/tokens/new
and make one with a funny name, and the **public_repo** scope only. (I think.)
Use it like
Create release draft on GitHub
```
$ env GITHUB_TOKEN=xxx bin/release draft
@@ -115,4 +118,4 @@ $ env GITHUB_TOKEN=xxx SUDO= bin/release publish
## Merge
Merge the release branch to master.
You're done. Congratulations.
You're done. Congratulations.