mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 09:57:02 +01:00
Remove logs
This commit is contained in:
parent
bf17d7e115
commit
3a9b3794eb
@ -8,7 +8,6 @@ const manifestPath = path.join(__dirname, '..', 'app', 'manifest.json')
|
||||
const manifest = require('../app/manifest.json')
|
||||
const versionBump = require('./version-bump')
|
||||
|
||||
console.dir(process.argv)
|
||||
const bumpType = normalizeType(process.argv[2])
|
||||
|
||||
|
||||
@ -17,12 +16,9 @@ readFile(changelogPath)
|
||||
const changelog = changeBuffer.toString()
|
||||
|
||||
const newData = await versionBump(bumpType, changelog, manifest)
|
||||
console.dir(newData)
|
||||
|
||||
const manifestString = JSON.stringify(newData.manifest, null, 2)
|
||||
|
||||
console.log('now writing files to ', changelogPath, manifestPath)
|
||||
console.log(typeof newData.manifest)
|
||||
await writeFile(changelogPath, newData.changelog)
|
||||
await writeFile(manifestPath, manifestString)
|
||||
|
||||
@ -33,17 +29,14 @@ readFile(changelogPath)
|
||||
|
||||
|
||||
function normalizeType (userInput) {
|
||||
console.log(`user inputted ${userInput}`)
|
||||
const err = new Error('First option must be a type (major, minor, or patch)')
|
||||
if (!userInput || typeof userInput !== 'string') {
|
||||
console.log('first no')
|
||||
throw err
|
||||
}
|
||||
|
||||
const lower = userInput.toLowerCase()
|
||||
|
||||
if (lower !== 'major' && lower !== 'minor' && lower !== 'patch') {
|
||||
console.log('second no')
|
||||
throw err
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,6 @@ function newVersionFrom (manifest, bumpType) {
|
||||
const string = manifest.version
|
||||
let segments = string.split('.').map((str) => parseInt(str))
|
||||
|
||||
console.log('bump type is ' + bumpType)
|
||||
switch (bumpType) {
|
||||
case 'major':
|
||||
segments[0] += 1
|
||||
|
@ -22,7 +22,6 @@ describe('version bumper', function () {
|
||||
const expected = '5.0.0'
|
||||
assert.equal(result.version, expected, 'major bumps correctly')
|
||||
assert.equal(result.manifest.version, expected, 'major bumps correctly')
|
||||
console.dir(result.changelog)
|
||||
assert.ok(result.changelog.includes(expected))
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user