File tree Expand file tree Collapse file tree 4 files changed +21
-10
lines changed Expand file tree Collapse file tree 4 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 48
48
STACK_EXCHANGE_ACCESS_TOKEN : ${{ secrets.STACK_EXCHANGE_ACCESS_TOKEN }}
49
49
AZURE_APP_CONFIGURATION_CONNECTION_STRING : ${{ secrets.AZURE_APP_CONFIGURATION_CONNECTION_STRING }}
50
50
run : |
51
- chmod +x ./scripts/populate-keys .sh
52
- sh ./scripts/populate-keys .sh
51
+ chmod +x ./scripts/populate-var-file .sh
52
+ sh ./scripts/populate-var-file .sh
53
53
54
54
- name : Running tests
55
55
run : npm run ci-test --if-present
Original file line number Diff line number Diff line change 9
9
"build" : " ng build --prod" ,
10
10
"test" : " ng test --browsers ChromeHeadless" ,
11
11
"test-headless" : " ng test --browsers ChromeHeadless" ,
12
- "ci-test" : " npm run config && ng test --no-watch --no-progress --browsers ChromeHeadless" ,
12
+ "ci-test" : " ng test --no-watch --no-progress --browsers ChromeHeadless" ,
13
13
"lint" : " ng lint" ,
14
14
"e2e" : " ng e2e"
15
15
},
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ > src/environments/keys.ts
4
+ echo ' export const AUTHORITY = "' $AUTHORITY ' ";' >> src/environments/keys.ts
5
+ echo ' export const CLIENT_ID = "' $CLIENT_ID ' ";' >> src/environments/keys.ts
6
+ echo ' export const SCOPES = ["' $SCOPES ' "];' >> src/environments/keys.ts
7
+ echo ' export const STACK_EXCHANGE_ID = "' $STACK_EXCHANGE_ID ' ";' >> src/environments/keys.ts
8
+ echo ' export const STACK_EXCHANGE_ACCESS_TOKEN = "' $STACK_EXCHANGE_ACCESS_TOKEN ' ";' >> src/environments/keys.ts
9
+ echo ' export const AZURE_APP_CONFIGURATION_CONNECTION_STRING = "' $AZURE_APP_CONFIGURATION_CONNECTION_STRING ' ";' >> src/environments/keys.ts
10
+ cat src/environments/keys.ts
Original file line number Diff line number Diff line change 1
1
const { writeFile } = require ( 'fs' ) ;
2
- require ( 'dotenv' ) . config ( ) ;
3
2
4
3
const pathJs = `./src/environments/keys.ts`
5
4
const contentKeys =
6
- `export const AUTHORITY = '${ process . env . AUTHORITY } ';
7
- export const CLIENT_ID = '${ process . env . CLIENT_ID } ';
8
- export const SCOPES = ['${ process . env . SCOPES } '];
9
- export const STACK_EXCHANGE_ID = '${ process . env . STACK_EXCHANGE_ID } ';
10
- export const STACK_EXCHANGE_ACCESS_TOKEN = '${ process . env . STACK_EXCHANGE_ACCESS_TOKEN } ';
11
- export const AZURE_APP_CONFIGURATION_CONNECTION_STRING = '${ process . env . AZURE_APP_CONFIGURATION_CONNECTION_STRING } ';
5
+ `export const AUTHORITY = '${ process . env [ " AUTHORITY" ] } ';
6
+ export const CLIENT_ID = '${ process . env [ " CLIENT_ID" ] } ';
7
+ export const SCOPES = ['${ process . env [ " SCOPES" ] } '];
8
+ export const STACK_EXCHANGE_ID = '${ process . env [ " STACK_EXCHANGE_ID" ] } ';
9
+ export const STACK_EXCHANGE_ACCESS_TOKEN = '${ process . env [ " STACK_EXCHANGE_ACCESS_TOKEN" ] } ';
10
+ export const AZURE_APP_CONFIGURATION_CONNECTION_STRING = '${ process . env [ " AZURE_APP_CONFIGURATION_CONNECTION_STRING" ] } ';
12
11
` ;
13
12
14
13
writeFile ( pathJs , contentKeys , function ( err ) {
15
14
if ( err ) {
16
15
console . log ( err ) ;
17
16
}
18
17
console . log ( `Wrote variables to ${ pathJs } ` ) ;
18
+ console . log ( `Wrote variables to ${ process . env [ "SCOPES" ] } ` ) ;
19
+ console . log ( `Wrote variables to ${ process . env [ "STACK_EXCHANGE_ID" ] } ` ) ;
19
20
} ) ;
20
21
21
22
const pathJson = `./src/environments/.keys.json`
You can’t perform that action at this time.
0 commit comments