aboutsummaryrefslogtreecommitdiffstats
path: root/development/run-version-bump.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2018-03-03 06:33:29 +0800
committerDan Finlay <dan@danfinlay.com>2018-03-03 09:16:17 +0800
commitbdbe29906976915196f347861e913f3f5b523d0e (patch)
tree354801301b29657c31fffc9ec6dd7d33289dd5d1 /development/run-version-bump.js
parent3a9b3794ebccbe3369a67e797186141dc011dd9d (diff)
downloadtangerine-wallet-browser-bdbe29906976915196f347861e913f3f5b523d0e.tar
tangerine-wallet-browser-bdbe29906976915196f347861e913f3f5b523d0e.tar.gz
tangerine-wallet-browser-bdbe29906976915196f347861e913f3f5b523d0e.tar.bz2
tangerine-wallet-browser-bdbe29906976915196f347861e913f3f5b523d0e.tar.lz
tangerine-wallet-browser-bdbe29906976915196f347861e913f3f5b523d0e.tar.xz
tangerine-wallet-browser-bdbe29906976915196f347861e913f3f5b523d0e.tar.zst
tangerine-wallet-browser-bdbe29906976915196f347861e913f3f5b523d0e.zip
Clean up run version bump script
Diffstat (limited to 'development/run-version-bump.js')
-rw-r--r--development/run-version-bump.js13
1 files changed, 6 insertions, 7 deletions
diff --git a/development/run-version-bump.js b/development/run-version-bump.js
index e06c00db3..fde14566e 100644
--- a/development/run-version-bump.js
+++ b/development/run-version-bump.js
@@ -7,12 +7,13 @@ const changelogPath = path.join(__dirname, '..', 'CHANGELOG.md')
const manifestPath = path.join(__dirname, '..', 'app', 'manifest.json')
const manifest = require('../app/manifest.json')
const versionBump = require('./version-bump')
-
const bumpType = normalizeType(process.argv[2])
+start().catch(console.error)
+
+async function start() {
-readFile(changelogPath)
-.then(async (changeBuffer) => {
+ const changeBuffer = await readFile(changelogPath)
const changelog = changeBuffer.toString()
const newData = await versionBump(bumpType, changelog, manifest)
@@ -22,10 +23,8 @@ readFile(changelogPath)
await writeFile(changelogPath, newData.changelog)
await writeFile(manifestPath, manifestString)
- return newData.version
-})
-.then((version) => console.log(`Bumped ${bumpType} to version ${version}`))
-.catch(console.error)
+ console.log(`Bumped ${bumpType} to version ${newData.version}`)
+}
function normalizeType (userInput) {