-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIGRATION] - Rebased and added a comment to check why script is failing
- Loading branch information
1 parent
c3f14e4
commit c9b04e2
Showing
2 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
// Protractor configuration file, see link for more information | ||
// https://github.com/angular/protractor/blob/master/lib/config.ts | ||
|
||
require('dotenv').config({path: process.env.ENV_FILE}); | ||
require('dotenv').config({ path: process.env.ENV_FILE }); | ||
const fs = require('fs'); | ||
|
||
console.log('==== REPLACING CONFIG VALUES ====='); | ||
const configPath = './dist/demo-shell/app.config.json'; | ||
|
||
fs.readFile(configPath, (err, appConfigString) => { | ||
if (err) throw err; | ||
let appConfig = JSON.parse(appConfigString); | ||
appConfig.providers = process.env.PROVIDERS || 'ALL'; | ||
appConfig.bpmHost = (process.env.PROXY_HOST_ADF || process.env.URL_HOST_ADF); | ||
appConfig.ecmHost = (process.env.PROXY_HOST_ADF || process.env.URL_HOST_ADF); | ||
appConfig.identityHost = (process.env.HOST_SSO + '/auth/admin/realms/alfresco'); | ||
appConfig.oauth2.host = (process.env.HOST_SSO + '/auth/realms/alfresco'); | ||
appConfig.bpmHost = process.env.PROXY_HOST_ADF || process.env.URL_HOST_ADF; | ||
appConfig.ecmHost = process.env.PROXY_HOST_ADF || process.env.URL_HOST_ADF; | ||
appConfig.identityHost = process.env.HOST_SSO + '/auth/admin/realms/alfresco'; | ||
appConfig.oauth2.host = process.env.HOST_SSO + '/auth/realms/alfresco'; | ||
appConfig.notificationDefaultDuration = process.env.NOTIFICATION_LAST || 8000; | ||
appConfig.authType = process.env.AUTH_TYPE || 'BASIC'; | ||
|
||
let appConfigReplacedJson = JSON.stringify(appConfig,null,4); | ||
|
||
let appConfigReplacedJson = JSON.stringify(appConfig, null, 4); | ||
|
||
fs.writeFileSync(configPath, appConfigReplacedJson); | ||
}); |