@@ -95,6 +95,11 @@ Promise.resolve()
95
95
. then ( ( ) => execute ( 'git' , './ngtools-webpack-builds' , 'add' , '-A' ) )
96
96
. then ( ( ) => getCommitMessage ( './angular-cli' ) )
97
97
. then ( ( message ) => execute ( 'git' , './ngtools-webpack-builds' , 'commit' , '-am' , message . substr ( 1 ) ) )
98
+ // Update the credentials using the GITHUB TOKEN.
99
+ . then ( ( ) => execute ( 'git' , './ngtools-webpack-builds' , 'config' , 'credential.helper' ,
100
+ 'store --file=.git/credentials' ) )
101
+ . then ( ( ) => fs . appendFileSync ( './ngtools-webpack-builds/.git/credentials' ,
102
+ `https://${ process . env [ 'GITHUB_TOKEN_ANGULAR' ] } :@github.com` ) )
98
103
. then ( ( ) => execute ( 'git' , './ngtools-webpack-builds' , 'push' ) )
99
104
//---------------------------- cli-builds ----------------------------------//
100
105
. then ( ( ) => printMessage ( 'Copying cli-builds dist....' ) )
@@ -107,6 +112,11 @@ Promise.resolve()
107
112
. then ( ( ) => execute ( 'git' , './cli-builds' , 'add' , '-A' ) )
108
113
. then ( ( ) => getCommitMessage ( './angular-cli' ) )
109
114
. then ( ( message ) => execute ( 'git' , './cli-builds' , 'commit' , '-am' , message . substr ( 1 ) ) )
115
+ // Update the credentials using the GITHUB TOKEN.
116
+ . then ( ( ) => execute ( 'git' , './cli-builds' , 'config' , 'credential.helper' ,
117
+ 'store --file=.git/credentials' ) )
118
+ . then ( ( ) => fs . appendFileSync ( './cli-builds/.git/credentials' ,
119
+ `https://${ process . env [ 'GITHUB_TOKEN_ANGULAR' ] } :@github.com` ) )
110
120
. then ( ( ) => execute ( 'git' , './cli-builds' , 'push' ) )
111
121
//---------------------------- done ----------------------------------------//
112
122
. then ( ( ) => console . log ( 'Done...' ) )
0 commit comments