From 51ef762750f8c591962809f32cdef45f55cf3c84 Mon Sep 17 00:00:00 2001 From: Natalia Date: Thu, 26 Jul 2018 23:24:07 -0700 Subject: [PATCH] Added calling version bump before release, minor publish-release update --- .circleci/config.yml | 20 +++++++------------- development/publish-release.js | 7 +++++-- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ccd23a4d8..4f40788d3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -78,6 +78,9 @@ workflows: - prep-build # - all-tests-pass - job-publish-prerelease: + # filters: + # branches: + # only: master requires: - prep-deps-npm - prep-build @@ -329,20 +332,11 @@ jobs: key: build-cache-{{ .Revision }} - restore_cache: key: job-screens-{{ .Revision }} - - store_artifacts: - path: dist/mascara - destination: builds/mascara - - store_artifacts: - path: dist/sourcemaps - destination: builds/sourcemaps - - store_artifacts: - path: builds - destination: builds - - store_artifacts: - path: test-artifacts - destination: test-artifacts - run: - name: build:announce + name: bump version + command: npm run version:bump minor + - run: + name: build:release command: node ./development/publish-release.js job-publish-postrelease: diff --git a/development/publish-release.js b/development/publish-release.js index c58df6445..a9a01e312 100644 --- a/development/publish-release.js +++ b/development/publish-release.js @@ -3,9 +3,11 @@ const request = require('request-promise'); const VERSION = require('../dist/chrome/manifest.json').version; const fs = require('fs'); -start().catch(console.error); +publishRelease().then(function () { + console.log("Published"); +}); -async function start() { +async function publishRelease() { console.log('VERSION', VERSION) const CIRCLE_SHA1 = process.env.CIRCLE_SHA1 let releaseId; @@ -13,6 +15,7 @@ async function start() { const CREATE_RELEASE_URI = `https://api.github.com/repos/Natalya11444/metamask-extension/releases`; console.log(`CREATE_RELEASE_URI: ${CREATE_RELEASE_URI}`) + // todo check title, release notes request({ method: 'POST', uri: CREATE_RELEASE_URI,