diff --git a/.travis.yml b/.travis.yml index f945e0b3..2f4ed4d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ env: global: - secure: "wbBkk3ujOixgrplG1baLP6lgjFr6bw2eiOsNYAyfwU8SeSoc4qgp8bGttigHOTwnPfAreLMlnGkFdPF3f8v31AHj98mevHKNxvkeFiRjDc9bI3rEviFnbZMWbsw7svzTw3/D4K1xZuHc46IReOU8OJUaQaAP/VquZ8S0ZLDyUslBLZyhQNgVtp5VmOyHie/iI+KvkOVZfhun2wVa5LJgmJJPCFIcPGdlWTf77InxZohBM1rPBB16UE/gXkLUlrMjqnZWRem92cN+mqkU7xolzeeWKdzvbD6pD0swCS3xbiFfwy9pHgxfDDYdqbQIuFKoRIOeIcSuFm8LQv5kXvdRGLM/aiND34V5rETB+uK9HCh66uDY/lpTVTpY8DlddbTitpgq1on1LEeVPdgvA1MU3wkQD++lrDT4hdNTNCsUvdbocceSlqEmrKycRUJCI8Z9HTnkCTXCITNFEw0brYTgrHE2+KY7ul4CYc0Xu0dHmm6SBHvdU38HLi4MRR/78VVP9anrH1zVVKiLP95vdFrwrXBFGewYVVwv4QjFuwnQFDTCLEYUNctyOF3H8pTLLbY0DWMM1LVU6abHfb0tDYpRCffKJv4Wf9wOcTNCemtaGaxgOY6vcy1/SmpVHa9WQkfDMywZrolByEwflw0wP/yUVdDVfRt/JeAVh9m4EhiHTc4=" - secure: "KwwThYC5XnQXlt0r3mUfV91N9+4CujoCzrfb9eBhvfTQL0yRofx75saXWhh/HNC8fYsf/3cPV3iASKlUXCw2MjYw7w7pzmbeeszBRkMJQHdDFqaTmDY167vv88Mddd90quanM8EEdCpjvrLLzgGpxQGQzVRZ7z0SmxJIEF/I58aAmC8hZ++5V/zAlwnhCbvs8ppJB7zTf3Ug4rSVr1/q52CK5f0ZVwX1TqOlzHv7KFO7IZV5DWmYHsClvcJbraAtBUa0otNTzr6dIHq8K22MWBULHCvp2JziZ06F3jjfPk7yB0K8Ia8gy73n+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diff --git a/src/repo_scripts/deploy.ts b/src/repo_scripts/deploy.ts index 971a0178..6bb382e2 100644 --- a/src/repo_scripts/deploy.ts +++ b/src/repo_scripts/deploy.ts @@ -18,7 +18,6 @@ import * as vsce from 'vsce'; const githubOwnerId = 'matepek'; const githubRepoId = 'vscode-catch2-test-adapter'; const githubRepoFullId = githubOwnerId + '/' + githubRepoId; -const githubDeployerMail = 'matepek+vscode-catch2-test-adapter@gmail.com'; 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'] || 'deployer@deployer.de'; + 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; });