diff options
author | Dan Finlay <dan@danfinlay.com> | 2018-03-03 06:33:29 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2018-03-03 09:16:17 +0800 |
commit | bdbe29906976915196f347861e913f3f5b523d0e (patch) | |
tree | 354801301b29657c31fffc9ec6dd7d33289dd5d1 | |
parent | 3a9b3794ebccbe3369a67e797186141dc011dd9d (diff) | |
download | tangerine-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
-rw-r--r-- | development/run-version-bump.js | 13 |
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) { |