Skip to content

Commit

Permalink
Merge pull request #1268 from cosmos/david/1177-do-not-publish-bis
Browse files Browse the repository at this point in the history
Do not try to publish a release on every push to `develop`!
  • Loading branch information
faboweb authored Sep 4, 2018
2 parents 40464b4 + 1668587 commit f8028d0
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
32 changes: 20 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,23 +129,33 @@ jobs:

steps:
- checkout
- run: sudo tasks/build/installWine.sh
- run: yarn install

- attach_workspace:
at: builds/Gaia

# download network configs
- run: tasks/build/testnets/build.sh
- run:
command: |
mostRecentTag=$(git describe --abbrev=0 --tags)
if [ $mostRecentTag = release-candidate ]; then
sudo tasks/build/installWine.sh
yarn install
# download network configs
tasks/build/testnets/build.sh
# build Voyager
node -e 'require("./tasks/build/build.js").buildAllPlatforms()'
# build Voyager
- run: node -e 'require("./tasks/build/build.js").buildAllPlatforms()'
# Delete the tag before testing the build in case it fails.
git push --delete origin release-candidate
# test linux build
- run: tar -zxvf ./builds/Voyager/Cosmos_Voyager-*-Linux.tar.gz
- run: yarn test:exe "./Cosmos Voyager"
# test linux build
tar -zxvf ./builds/Voyager/Cosmos_Voyager-*-Linux.tar.gz
yarn test:exe "./Cosmos Voyager"
- run: node tasks/publish.js
node tasks/publish.js
fi
workflows:
version: 2
Expand Down Expand Up @@ -183,8 +193,6 @@ workflows:
filters:
branches:
only: develop
tags:
only: /^v.*/

release:
jobs:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

### Fixed

* Do not try to publish a release on every push to `develop`. @NodeGuy
* Do not try to publish a release on every push to `develop`! @NodeGuy

## [0.10.2] - 2018-08-29

Expand Down
3 changes: 2 additions & 1 deletion tasks/createReleasePR.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ const pushCommit = async ({ token, head }) => {
// needed to authenticate properly
await git.addRemote("bot", `https://${token}@github.com/cosmos/voyager.git`)

await git.push("bot", `HEAD:${head}`)
await git.tag([`release-candidate`])
await git.push("bot", `HEAD:${head}`, { tags: true })
}

const recentChanges = changeLog =>
Expand Down
2 changes: 1 addition & 1 deletion tasks/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async function main() {
`https://${process.env.GIT_BOT_TOKEN}@github.com/cosmos/voyager.git`
)

await git.tag([tag])
await git.tag([tag], { annotate: true })
await git.push("bot", "HEAD:master", { tags: true })

console.log("--- Done releasing ---")
Expand Down

0 comments on commit f8028d0

Please sign in to comment.