fixed script

This commit is contained in:
phips28 2019-10-26 21:35:29 +02:00
parent 6c87be1ab9
commit 8eca834494
1 changed files with 3 additions and 2 deletions

View File

@ -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'])