-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate secret.ts dynamically from environment variables before build.
Fix #148.
- Loading branch information
1 parent
c6474f5
commit d7a019d
Showing
9 changed files
with
38 additions
and
115 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 |
---|---|---|
|
@@ -30,7 +30,7 @@ jobs: | |
run: npm install | ||
|
||
- name: Build Ionic | ||
run: ionic build -- --base-href=/capture-lite/ | ||
run: npm run build -- --base-href=/capture-lite/ | ||
|
||
- name: Deploy | ||
uses: JamesIves/[email protected] | ||
|
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
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const fs = require('fs'); | ||
|
||
// Configure Angular `secret.ts` file path | ||
const targetPath = './src/environments/secret.ts'; | ||
|
||
// `secret.ts` file structure | ||
const envConfigFile = `export const secret = { | ||
numbersStorageBaseUrl: '${process.env.NUMBERS_STORAGE_BASE_URL}' | ||
}; | ||
`; | ||
fs.writeFile(targetPath, envConfigFile, err => { | ||
if (err) { throw console.error(err); } | ||
else { console.log(`Angular secrets.ts file generated correctly at ${targetPath} \n`); } | ||
}); |
This file was deleted.
Oops, something went wrong.
13 changes: 4 additions & 9 deletions
13
src/app/services/publisher/numbers-storage/numbers-storage-api.service.ts
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 was deleted.
Oops, something went wrong.