mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
Merge pull request #3411 from MetaMask/AutoVersionBump
Clean up run version bump script
This commit is contained in:
commit
36c5bf203e
@ -7,12 +7,13 @@ const changelogPath = path.join(__dirname, '..', 'CHANGELOG.md')
|
|||||||
const manifestPath = path.join(__dirname, '..', 'app', 'manifest.json')
|
const manifestPath = path.join(__dirname, '..', 'app', 'manifest.json')
|
||||||
const manifest = require('../app/manifest.json')
|
const manifest = require('../app/manifest.json')
|
||||||
const versionBump = require('./version-bump')
|
const versionBump = require('./version-bump')
|
||||||
|
|
||||||
const bumpType = normalizeType(process.argv[2])
|
const bumpType = normalizeType(process.argv[2])
|
||||||
|
|
||||||
|
start().catch(console.error)
|
||||||
|
|
||||||
readFile(changelogPath)
|
async function start() {
|
||||||
.then(async (changeBuffer) => {
|
|
||||||
|
const changeBuffer = await readFile(changelogPath)
|
||||||
const changelog = changeBuffer.toString()
|
const changelog = changeBuffer.toString()
|
||||||
|
|
||||||
const newData = await versionBump(bumpType, changelog, manifest)
|
const newData = await versionBump(bumpType, changelog, manifest)
|
||||||
@ -22,10 +23,8 @@ readFile(changelogPath)
|
|||||||
await writeFile(changelogPath, newData.changelog)
|
await writeFile(changelogPath, newData.changelog)
|
||||||
await writeFile(manifestPath, manifestString)
|
await writeFile(manifestPath, manifestString)
|
||||||
|
|
||||||
return newData.version
|
console.log(`Bumped ${bumpType} to version ${newData.version}`)
|
||||||
})
|
}
|
||||||
.then((version) => console.log(`Bumped ${bumpType} to version ${version}`))
|
|
||||||
.catch(console.error)
|
|
||||||
|
|
||||||
|
|
||||||
function normalizeType (userInput) {
|
function normalizeType (userInput) {
|
||||||
|
Loading…
Reference in New Issue
Block a user