aboutsummaryrefslogtreecommitdiffstats
path: root/development/run-version-bump.js
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-03-09 13:37:27 +0800
committerDan <danjm.com@gmail.com>2018-03-09 13:37:27 +0800
commit81e72147ef829acbbed85bced7f0eb4533f2fb17 (patch)
tree0e13f8ea4e6fb80fe57e437a466e3f7ae04c6c22 /development/run-version-bump.js
parent2d6b378bf8f8f0b23ef54b48118b61fb6c7deee1 (diff)
parentf28bbe5b0392a9ae45f7f17fbc979ef796b27d16 (diff)
downloaddexon-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.js13
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) {