@@ -93,6 +93,8 @@ function main() {
9393 const tempRoot = temp . mkdirSync ( 'angular-cli-builds' ) ;
9494 const tempExec = new Executor ( tempRoot ) ;
9595
96+ const branchName = process . env [ 'TRAVIS_BRANCH' ] ;
97+
9698 console . log ( green ( 'Cloning builds repos...\n' ) ) ;
9799 tempExec . git ( 'clone' , cliBuilds ) ;
98100 tempExec . git ( 'clone' , ngToolsWebpackBuilds ) ;
@@ -110,7 +112,7 @@ function main() {
110112 const hash = message . split ( ' ' ) [ 0 ] ;
111113
112114 console . log ( green ( 'Copying ng-tools-webpack-builds dist' ) ) ;
113- ngToolsWebpackBuildsExec . git ( 'checkout' , '-B' , process . env [ 'TRAVIS_BRANCH' ] ) ;
115+ ngToolsWebpackBuildsExec . git ( 'checkout' , '-B' , branchName ) ;
114116 ngToolsWebpackBuildsExec . rm ( '-rf' , ...ngToolsWebpackBuildsExec . glob ( '*' ) ) ;
115117 cliExec . cp ( 'dist/@ngtools/webpack' , ngToolsWebpackBuildsRoot ) ;
116118 console . log ( green ( 'Updating package.json version' ) ) ;
@@ -125,7 +127,7 @@ function main() {
125127
126128
127129 console . log ( green ( 'Copying cli-builds dist' ) ) ;
128- cliBuildsExec . git ( 'checkout' , '-B' , process . env [ 'TRAVIS_BRANCH' ] ) ;
130+ cliBuildsExec . git ( 'checkout' , '-B' , branchName ) ;
129131 cliBuildsExec . rm ( '-rf' , ...cliBuildsExec . glob ( '*' ) ) ;
130132 cliExec . cp ( 'dist/@angular/cli' , cliBuildsRoot ) ;
131133
@@ -142,10 +144,10 @@ function main() {
142144 `https://${ process . env [ 'GITHUB_ACCESS_TOKEN' ] } @github.com` ) ;
143145
144146 console . log ( green ( 'Done. Pushing...' ) ) ;
145- ngToolsWebpackBuildsExec . git ( 'push' , '-f' ) ;
146- ngToolsWebpackBuildsExec . git ( 'push' , '--tags' ) ;
147- cliBuildsExec . git ( 'push' , '-f' ) ;
148- cliBuildsExec . git ( 'push' , '--tags' ) ;
147+ ngToolsWebpackBuildsExec . git ( 'push' , '-f' , branchName ) ;
148+ ngToolsWebpackBuildsExec . git ( 'push' , '--tags' , branchName ) ;
149+ cliBuildsExec . git ( 'push' , '-f' , branchName ) ;
150+ cliBuildsExec . git ( 'push' , '--tags' , branchName ) ;
149151}
150152
151153main ( ) ;
0 commit comments