fixed script
This commit is contained in:
parent
6c87be1ab9
commit
8eca834494
5
index.js
5
index.js
|
@ -29,14 +29,15 @@ Toolkit.run(async tools => {
|
|||
const current = pkg.version.toString()
|
||||
await tools.runInWorkspace('git', ['checkout', 'master'])
|
||||
await tools.runInWorkspace('npm',
|
||||
['version', '--allow-same-version=true', '--git-tag-version=false', current, 'master'])
|
||||
['version', '--allow-same-version=true', '--git-tag-version=false', current])
|
||||
console.log('current:', current, '/', 'version:', version)
|
||||
const newVersion = execSync(`npm version --git-tag-version=false ${version}`).toString()
|
||||
console.log('new version:', newVersion)
|
||||
await tools.runInWorkspace('git', ['commit', '-a', '-m', `'ci: ${commitMessage} ${newVersion}'`])
|
||||
await tools.runInWorkspace('git', ['commit', '-a', '-m', `"ci: ${commitMessage} ${newVersion}"`])
|
||||
|
||||
const remoteRepo = `https://${process.env.GITHUB_ACTOR}:${process.env.GITHUB_TOKEN}@github.com/${process.env.GITHUB_REPOSITORY}.git`
|
||||
console.log('remoteRepo:', remoteRepo)
|
||||
console.log('remoteRepo:', tools.context.repo)
|
||||
|
||||
await tools.runInWorkspace('git', ['tag', '-a', newVersion])
|
||||
await tools.runInWorkspace('git', ['push', `"${remoteRepo}"`, '--follow-tags'])
|
||||
|
|
Loading…
Reference in New Issue