@@ -93,6 +93,8 @@ function main() {
93
93
const tempRoot = temp . mkdirSync ( 'angular-cli-builds' ) ;
94
94
const tempExec = new Executor ( tempRoot ) ;
95
95
96
+ const branchName = process . env [ 'TRAVIS_BRANCH' ] ;
97
+
96
98
console . log ( green ( 'Cloning builds repos...\n' ) ) ;
97
99
tempExec . git ( 'clone' , cliBuilds ) ;
98
100
tempExec . git ( 'clone' , ngToolsWebpackBuilds ) ;
@@ -110,7 +112,7 @@ function main() {
110
112
const hash = message . split ( ' ' ) [ 0 ] ;
111
113
112
114
console . log ( green ( 'Copying ng-tools-webpack-builds dist' ) ) ;
113
- ngToolsWebpackBuildsExec . git ( 'checkout' , '-B' , process . env [ 'TRAVIS_BRANCH' ] ) ;
115
+ ngToolsWebpackBuildsExec . git ( 'checkout' , '-B' , branchName ) ;
114
116
ngToolsWebpackBuildsExec . rm ( '-rf' , ...ngToolsWebpackBuildsExec . glob ( '*' ) ) ;
115
117
cliExec . cp ( 'dist/@ngtools/webpack' , ngToolsWebpackBuildsRoot ) ;
116
118
console . log ( green ( 'Updating package.json version' ) ) ;
@@ -125,7 +127,7 @@ function main() {
125
127
126
128
127
129
console . log ( green ( 'Copying cli-builds dist' ) ) ;
128
- cliBuildsExec . git ( 'checkout' , '-B' , process . env [ 'TRAVIS_BRANCH' ] ) ;
130
+ cliBuildsExec . git ( 'checkout' , '-B' , branchName ) ;
129
131
cliBuildsExec . rm ( '-rf' , ...cliBuildsExec . glob ( '*' ) ) ;
130
132
cliExec . cp ( 'dist/@angular/cli' , cliBuildsRoot ) ;
131
133
@@ -142,10 +144,10 @@ function main() {
142
144
`https://${ process . env [ 'GITHUB_ACCESS_TOKEN' ] } @github.com` ) ;
143
145
144
146
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 ) ;
149
151
}
150
152
151
153
main ( ) ;
0 commit comments