@@ -95,6 +95,11 @@ Promise.resolve()
9595 . then ( ( ) => execute ( 'git' , './ngtools-webpack-builds' , 'add' , '-A' ) )
9696 . then ( ( ) => getCommitMessage ( './angular-cli' ) )
9797 . 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` ) )
98103 . then ( ( ) => execute ( 'git' , './ngtools-webpack-builds' , 'push' ) )
99104 //---------------------------- cli-builds ----------------------------------//
100105 . then ( ( ) => printMessage ( 'Copying cli-builds dist....' ) )
@@ -107,6 +112,11 @@ Promise.resolve()
107112 . then ( ( ) => execute ( 'git' , './cli-builds' , 'add' , '-A' ) )
108113 . then ( ( ) => getCommitMessage ( './angular-cli' ) )
109114 . 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` ) )
110120 . then ( ( ) => execute ( 'git' , './cli-builds' , 'push' ) )
111121 //---------------------------- done ----------------------------------------//
112122 . then ( ( ) => console . log ( 'Done...' ) )
0 commit comments