debug: fully roll back
This commit is contained in:
parent
7b918084f2
commit
775791f114
|
@ -46,21 +46,11 @@ const run = async () => {
|
|||
version = 'minor'
|
||||
}
|
||||
|
||||
const runExec = str => process.stdout.write(execSync(str))
|
||||
|
||||
/* configure git */
|
||||
const { GITHUB_ACTOR, GITHUB_TOKEN, GITHUB_REPOSITORY } = process.env
|
||||
const remote = `https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git`
|
||||
console.log({ remote })
|
||||
runExec(`git remote add publish ${remote}`)
|
||||
runExec(`git config user.name "Merge Release"`)
|
||||
runExec(`git config user.email "merge-release@users.noreply.github.com"`)
|
||||
|
||||
let current = execSync(`npm view ${pkg.name} version`).toString()
|
||||
runExec(`npm version --allow-same-version=true --git-tag-version=false ${current} `)
|
||||
process.stdout.write(execSync(`npm version --allow-same-version=true --git-tag-version=false ${current} `))
|
||||
let newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString()
|
||||
console.log(newVersion)
|
||||
runExec(`npm publish --access=public`)
|
||||
runExec(`git checkout package.json`)
|
||||
process.stdout.write(execSync(`npm publish --access=public`))
|
||||
process.stdout.write(execSync(`git checkout package.json`))
|
||||
}
|
||||
run()
|
||||
|
|
Loading…
Reference in New Issue