aboutsummaryrefslogtreecommitdiffstats
path: root/development/run-version-bump.js
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2018-03-14 06:27:26 +0800
committerfrankiebee <frankie.diamond@gmail.com>2018-03-14 06:27:26 +0800
commita2c14ad02b6f080efe18535d64efe4acdaa5f310 (patch)
treea4f10bab758b35c5344557907c7c95a396e4fbb9 /development/run-version-bump.js
parentc465d510b100fdf9926413751df04cbd59de68eb (diff)
parentc83a9ceb04a485149fe65fbb2b44f0adeda696b1 (diff)
downloadtangerine-wallet-browser-a2c14ad02b6f080efe18535d64efe4acdaa5f310.tar
tangerine-wallet-browser-a2c14ad02b6f080efe18535d64efe4acdaa5f310.tar.gz
tangerine-wallet-browser-a2c14ad02b6f080efe18535d64efe4acdaa5f310.tar.bz2
tangerine-wallet-browser-a2c14ad02b6f080efe18535d64efe4acdaa5f310.tar.lz
tangerine-wallet-browser-a2c14ad02b6f080efe18535d64efe4acdaa5f310.tar.xz
tangerine-wallet-browser-a2c14ad02b6f080efe18535d64efe4acdaa5f310.tar.zst
tangerine-wallet-browser-a2c14ad02b6f080efe18535d64efe4acdaa5f310.zip
Merge remote-tracking branch 'origin/i#3509' into i#3509
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) {