-
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
13 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,6 @@ import * as vsce from 'vsce'; | |
const githubOwnerId = 'matepek'; | ||
const githubRepoId = 'vscode-catch2-test-adapter'; | ||
const githubRepoFullId = githubOwnerId + '/' + githubRepoId; | ||
const githubDeployerMail = '[email protected]'; | ||
const vscodeExtensionId = githubOwnerId + '-' + githubRepoId; | ||
|
||
|
||
|
@@ -157,13 +156,19 @@ function gitCommitAndTag(info: Info) { | |
console.log('Creating commit and signed tag'); | ||
|
||
return Promise.resolve() | ||
.then(() => { | ||
assert.ok(process.env['TRAVIS_BRANCH'] != undefined); | ||
const branch = process.env['TRAVIS_BRANCH']!; | ||
return spawn('git', 'checkout', branch); | ||
}) | ||
.then(() => { | ||
return spawn( | ||
'git', 'config', '--local', 'user.name', 'deploy.js script'); | ||
}) | ||
.then(() => { | ||
return spawn( | ||
'git', 'config', '--local', 'user.email', githubDeployerMail); | ||
const deployerMail = | ||
process.env['DEPLOYER_MAIL'] || '[email protected]'; | ||
return spawn('git', 'config', '--local', 'user.email', deployerMail); | ||
}) | ||
.then(() => { | ||
return spawn('git', 'status'); | ||
|
@@ -196,16 +201,11 @@ function gitCommitAndTag(info: Info) { | |
function gitPush(info: Info) { | ||
console.log('Pushing to origin'); | ||
|
||
assert.ok(process.env['TRAVIS_BRANCH'] != undefined); | ||
const branch = process.env['TRAVIS_BRANCH']!; | ||
assert.ok(process.env['GITHUB_API_KEY'] != undefined); | ||
return spawn('git', 'checkout', branch) | ||
.then(() => { | ||
return spawn( | ||
'git', 'push', '--follow-tags', | ||
'https://' + githubOwnerId + ':' + process.env['GITHUB_API_KEY']! + | ||
'@github.com/' + githubRepoFullId + '.git'); | ||
}) | ||
return spawn( | ||
'git', 'push', '--follow-tags', | ||
'https://' + githubOwnerId + ':' + process.env['GITHUB_API_KEY']! + | ||
'@github.com/' + githubRepoFullId + '.git') | ||
.then(() => { | ||
return info; | ||
}); | ||
|