File tree Expand file tree Collapse file tree 5 files changed +16
-18
lines changed Expand file tree Collapse file tree 5 files changed +16
-18
lines changed Original file line number Diff line number Diff line change @@ -48,16 +48,11 @@ jobs:
4848 BASE_PATH : " src/environments/"
4949 run : |
5050 import os
51- import json
52- data = {}
5351 base_path = os.environ.get('BASE_PATH', 'src/environments/')
54- with open(base_path + "keys.example.json", "r+") as jsonFileRead:
55- data = json.load(jsonFileRead)
56- data["scopes"] = str(os.environ['SCOPES']).split(",")
57- data["client_id"] = os.environ['CLIENT_ID']
58- data["authority"] = os.environ['AUTHORITY']
59- with open(base_path + ".keys.json", "w+") as jsonFileWrite:
60- json.dump(data, jsonFileWrite)
52+ with open(base_path + "keys.ts", "w") as fileWithKeys:
53+ fileWithKeys.write('export const AUTHORITY = ') + str(os.environ['SCOPES']).split(",") + ';';
54+ fileWithKeys.write('\nexport const CLIENT_ID = ' + os.environ['CLIENT_ID']) + ';';
55+ fileWithKeys.write('\nexport const SCOPES = ' + os.environ['AUTHORITY']) + ';';
6156
6257 - name : Run the test
6358 run : npm run ci-test --if-present
Original file line number Diff line number Diff line change 1- import * as keys from './. keys.json ' ;
1+ import * as keys from './keys' ;
22
33export const environment = {
44 production : true
55} ;
66
7- export const AUTHORITY = keys . authority ;
8- export const CLIENT_ID = keys . client_id ;
9- export const SCOPES = keys . scopes ;
7+ export const AUTHORITY = keys . AUTHORITY ;
8+ export const CLIENT_ID = keys . CLIENT_ID ;
9+ export const SCOPES = keys . SCOPES ;
Original file line number Diff line number Diff line change 11// This file can be replaced during build by using the `fileReplacements` array.
22// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
33// The list of file replacements can be found in `angular.json`.
4- import * as keys from './. keys.json ' ;
4+ import * as keys from './keys' ;
55
66export const environment = {
77 production : false ,
88 timeTrackerApiUrl : 'https://timetracker-api.azurewebsites.net'
99} ;
1010
11- export const AUTHORITY = keys . authority ;
12- export const CLIENT_ID = keys . client_id ;
13- export const SCOPES = keys . scopes ;
11+ export const AUTHORITY = keys . AUTHORITY ;
12+ export const CLIENT_ID = keys . CLIENT_ID ;
13+ export const SCOPES = keys . SCOPES ;
1414
1515/*
1616 * For easier debugging in development mode, you can import the following file
Original file line number Diff line number Diff line change 1+ export const AUTHORITY = 'XXX' ;
2+ export const CLIENT_ID = 'XXX' ;
3+ export const SCOPES = [ 'XXX' ] ;
Original file line number Diff line number Diff line change 2626 " clear-text" ,
2727 " html"
2828 ],
29- "maxConcurrentTestRunners" : 2 ,
29+ "maxConcurrentTestRunners" : 4 ,
3030 "maxConcurrentTestRunners_comment" : " Recommended to use about half of your available cores when running stryker with angular" ,
3131 "coverageAnalysis" : " off"
3232}
You can’t perform that action at this time.
0 commit comments