Skip to content

Commit

Permalink
Merge branch 'develop' into fabo/926-fix-encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
faboweb committed Jul 23, 2018
2 parents af53636 + f9c3220 commit fec89ab
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 25 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Fixed

* fixed release process and documentation @faboweb
* Showing weird characters @faboweb

## [0.8.1] - 2018-07-23
Expand Down
30 changes: 15 additions & 15 deletions docs/release.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Creating a Cosmos Voyager Release

### Housekeeping
### Automatic Release

There are a few miscellaneous tasks to do before making a new release:
There is an automatic release process setup. Just push to release and the CI will create a release candidate PR. If this is merged the CI will create and publish the release.

1. Ensure the default network is correct in `app/config.toml`:
### Manual Release

```toml
default_network = "gaia-5001"
```
If the CI is broken, you can also manually release. Therefor you need a GitHub access token with simple repository rights.

2. Ensure the network params you wish to use are in a folder at
`app/networks/<networkname>`. It requires the `genesis.json`, `config.toml`,
and `gaiaversion.txt` files. You can get them from the testnets repo
(https://github.com/tendermint/testnets).
1. Update `CHANGELOG.md`.
1. Commit and PR the above changes if necessary.
1. Push the commit to the `release` branch. If the tests pass then it will also
be pushed to `master` and a release will be published on GitHub.
First create the release candidate:
`GIT_BOT_TOKEN={TOKEN} node tasks/releasePullRequest.js`

If this is merged, checkout the new develop. Then cleanup the release folder:
`rm -rf ./builds/Voyager`

Now build Voyager (checkout the <a href="../README.md#build-gaia">README.md</a> for how to build).

Now you publish the release:
`GIT_BOT_TOKEN={TOKEN} node tasks/publish.js`

### Verifying Builds with the Team

Expand All @@ -28,7 +28,7 @@ for each of the builds, which greatly increases security by reducing the chances
that a build was backdoored by an attacker who has compromised one of our
machines. (When dealing with huge sums of money, we can never be too careful).

1. Make a production build (see how in <a href="../README.md">README.md</a>).
1. Make a production build (see how in <a href="../README.md#build-gaia">README.md</a>).
1. Paste the output from the previous commands into Slack and ensure everyone
has matching hashes.
1. As a team, run the app at least once on each platform to double-check that
Expand Down
17 changes: 7 additions & 10 deletions tasks/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

const fs = require("fs")
const path = require("path")
const git = require("simple-git/promise")()
const release = require("publish-release")
const util = require("util")

const assetsDir = path.join(__dirname, `../builds/Voyager`)

const getTag = packageJson => "v" + packageJson.version

const recentChanges = changeLog =>
changeLog.match(/.+?## .+?\n## .+?\n\n(.+?)\n## /s)[1]

Expand Down Expand Up @@ -36,24 +37,20 @@ async function main() {
console.log("--- Publishing release ---")

const notes = createNotes(
fs.readFileSync(path.join(__dirname, `../CHANGELOG.md`))
fs.readFileSync(path.join(__dirname, `../CHANGELOG.md`), "utf8")
)

const tag = await git.tag(`--points-at`, `HEAD`)
const tag = getTag(
JSON.parse(fs.readFileSync(path.join(__dirname, `../package.json`), "utf8"))
)
console.log("--- Releasing tag", tag, "---")

await publishRelease({
notes,
token: process.env.GIT_BOT_TOKEN,
tag
})

// needed to authenticate properly
await git.addRemote(
"bot",
`https://${process.env.GIT_BOT_TOKEN}@github.com/cosmos/voyager.git`
)

await git.push("bot", "HEAD:master")
console.log("--- Done releasing ---")
}

Expand Down

0 comments on commit fec89ab

Please sign in to comment.