diff options
author | kumavis <kumavis@users.noreply.github.com> | 2018-03-07 09:11:49 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-07 09:11:49 +0800 |
commit | 36c5bf203ede58f75468c27ae17a0a7d7adc4628 (patch) | |
tree | fc5e75ce5ce7cb32d9d54db4244118a4efb5dcca | |
parent | 9762a730413129361062804aa8dfc7be7cf74868 (diff) | |
parent | bdbe29906976915196f347861e913f3f5b523d0e (diff) | |
download | tangerine-wallet-browser-36c5bf203ede58f75468c27ae17a0a7d7adc4628.tar tangerine-wallet-browser-36c5bf203ede58f75468c27ae17a0a7d7adc4628.tar.gz tangerine-wallet-browser-36c5bf203ede58f75468c27ae17a0a7d7adc4628.tar.bz2 tangerine-wallet-browser-36c5bf203ede58f75468c27ae17a0a7d7adc4628.tar.lz tangerine-wallet-browser-36c5bf203ede58f75468c27ae17a0a7d7adc4628.tar.xz tangerine-wallet-browser-36c5bf203ede58f75468c27ae17a0a7d7adc4628.tar.zst tangerine-wallet-browser-36c5bf203ede58f75468c27ae17a0a7d7adc4628.zip |
Merge pull request #3411 from MetaMask/AutoVersionBump
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) { |