diff options
author | Dan <danjm.com@gmail.com> | 2018-03-09 13:37:27 +0800 |
---|---|---|
committer | Dan <danjm.com@gmail.com> | 2018-03-09 13:37:27 +0800 |
commit | 81e72147ef829acbbed85bced7f0eb4533f2fb17 (patch) | |
tree | 0e13f8ea4e6fb80fe57e437a466e3f7ae04c6c22 /development/run-version-bump.js | |
parent | 2d6b378bf8f8f0b23ef54b48118b61fb6c7deee1 (diff) | |
parent | f28bbe5b0392a9ae45f7f17fbc979ef796b27d16 (diff) | |
download | dexon-wallet-81e72147ef829acbbed85bced7f0eb4533f2fb17.tar.gz dexon-wallet-81e72147ef829acbbed85bced7f0eb4533f2fb17.tar.zst dexon-wallet-81e72147ef829acbbed85bced7f0eb4533f2fb17.zip |
Merge branch 'master' into retry-tx-refractor
Diffstat (limited to 'development/run-version-bump.js')
-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 e06c00db..fde14566 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) { |