From 6ae8f06e0e5ef3f4b9f53936dbfd730bd3ddf7e9 Mon Sep 17 00:00:00 2001 From: Karoly Albert Szabo Date: Thu, 14 Feb 2019 11:08:47 +0100 Subject: [PATCH 1/4] test the release PR process Signed-off-by: Karoly Albert Szabo --- .circleci/config.yml | 25 +++++++++---------------- tasks/createReleasePR.js | 5 +++-- tasks/publish.js | 7 ++----- 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cc55909e64..cfc4086ac1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -245,21 +245,8 @@ jobs: git push --delete bot release-candidate npm -g uninstall yarn ; npm -g install yarn@1.13.0 - - sudo tasks/build/installWine.sh yarn install - # download network configs - # skip as this will overwrite game of stakes - # tasks/build/testnets/build.sh - - # build Voyager - node tasks/build/build.js - - # test linux build - tar -zxvf ./builds/Voyager/Cosmos_Voyager-*-Linux.tar.gz - yarn test:exe "./Cosmos Voyager" - node tasks/publish.js fi @@ -322,9 +309,15 @@ workflows: branches: only: develop + # Every UTC midnight we go on develop and release release: - jobs: - - release: + triggers: + - schedule: + cron: "11 10 * * *" filters: branches: - only: release + only: + - develop + - sabau/auto-release-PR-first-step + jobs: + - release diff --git a/tasks/createReleasePR.js b/tasks/createReleasePR.js index 04e033b825..5d4d4326ae 100644 --- a/tasks/createReleasePR.js +++ b/tasks/createReleasePR.js @@ -27,7 +27,8 @@ const pushCommit = ({ token, branch }) => set -o verbose git config --local user.name "Voyager Bot" git config --local user.email "voyager_bot@tendermint.com" -git commit --all --message="Bump version for release." +git add CHANGELOG.md package.json +git commit --message="Bump version for release." git tag --force release-candidate git remote add bot https://${token}@github.com/cosmos/voyager.git git push --force --tags bot HEAD:${branch} @@ -47,7 +48,7 @@ const createPullRequest = async ({ changeLog, token, tag, head }) => { repo: `voyager`, title: `automatic release created for ${tag}`, head, - base: `develop`, + base: `master`, body: recentChanges(changeLog), maintainer_can_modify: true }) diff --git a/tasks/publish.js b/tasks/publish.js index e38dc4bd39..87e683c451 100644 --- a/tasks/publish.js +++ b/tasks/publish.js @@ -6,13 +6,11 @@ const path = require(`path`) const release = require(`publish-release`) const util = require(`util`) -const assetsDir = path.join(__dirname, `../builds/Voyager`) - const recentChanges = changeLog => changeLog.match(/.+?## .+?\n## .+?\n\n(.+?)\n## /s)[1] const createNotes = changeLog => `NOTE: DO NOT ENTER YOUR FUNDRAISER SEED. THIS SOFTWARE HAS NOT BEEN AUDITED. -NEVER ENTER YOUR FUNDRAISER SEED 12 WORDS ONTO AN ONLINE COMPUTER. +NEVER ENTER YOUR FUNDRAISER SEED 24 WORDS ONTO AN ONLINE COMPUTER. Even when we do start supporting fundraiser seeds, don't use it except for testing or with small amounts. We will release a CLI to use for offline signing @@ -28,8 +26,7 @@ const publishRelease = ({ notes, tag, token }) => tag, name: `Cosmos Voyager Alpha ${tag} (UNSAFE)`, notes, - prerelease: true, - assets: fs.readdirSync(assetsDir).map(file => path.join(assetsDir, file)) + prerelease: true }) if (require.main === module) { From 7a37f94b845abdd33a005082bf1a7bb53eba1231 Mon Sep 17 00:00:00 2001 From: Karoly Albert Szabo Date: Thu, 14 Feb 2019 11:10:37 +0100 Subject: [PATCH 2/4] change trigger time Signed-off-by: Karoly Albert Szabo --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cfc4086ac1..1a7935da67 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -313,7 +313,7 @@ workflows: release: triggers: - schedule: - cron: "11 10 * * *" + cron: "15 10 * * *" filters: branches: only: From 585423ff7855bff592fb006abd421589a5b35021 Mon Sep 17 00:00:00 2001 From: Karoly Albert Szabo Date: Thu, 14 Feb 2019 16:56:16 +0100 Subject: [PATCH 3/4] fix cron, remove sabau branch, publish test fix with 24 words Signed-off-by: Karoly Albert Szabo --- .circleci/config.yml | 3 +-- test/unit/specs/publish.spec.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fd4f9b22c5..7fee4c36f5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -331,11 +331,10 @@ workflows: release: triggers: - schedule: - cron: "15 10 * * *" + cron: "0 0 * * *" filters: branches: only: - develop - - sabau/auto-release-PR-first-step jobs: - release diff --git a/test/unit/specs/publish.spec.js b/test/unit/specs/publish.spec.js index d65b91c984..8a566e901f 100644 --- a/test/unit/specs/publish.spec.js +++ b/test/unit/specs/publish.spec.js @@ -36,7 +36,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ` const notes = `NOTE: DO NOT ENTER YOUR FUNDRAISER SEED. THIS SOFTWARE HAS NOT BEEN AUDITED. -NEVER ENTER YOUR FUNDRAISER SEED 12 WORDS ONTO AN ONLINE COMPUTER. +NEVER ENTER YOUR FUNDRAISER SEED 24 WORDS ONTO AN ONLINE COMPUTER. Even when we do start supporting fundraiser seeds, don't use it except for testing or with small amounts. We will release a CLI to use for offline signing From b12af2a8f580eaf8e142657997e0e83136d97fca Mon Sep 17 00:00:00 2001 From: Karoly Albert Szabo Date: Thu, 14 Feb 2019 16:58:51 +0100 Subject: [PATCH 4/4] chanfelog Signed-off-by: Karoly Albert Szabo --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9723837f44..54ec7f7c7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,6 +69,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - [\#1866](https://github.com/cosmos/voyager/issues/1866) Added blocks to network page and a page for viewing individual blocks @jbibla - [\#1911](https://github.com/cosmos/voyager/issues/1911) Upload code to Sentry for remote error analyzer @faboweb - Added development mode warning @faboweb +- [\#1972](https://github.com/cosmos/voyager/pull/1972) Add auto PR cron job to circle ci @sabau ### Changed