Skip to content

Commit

Permalink
9562-implement-dynamic-environment-variable-loading-for-single-artifa…
Browse files Browse the repository at this point in the history
…ct-deployment
  • Loading branch information
leomendoza123 committed Jan 28, 2025
1 parent f7f1052 commit 6237024
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 32 deletions.
1 change: 1 addition & 0 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
"src/styles.scss",
"src/assets/scss/grid.scss"
],
"scripts": ["src/assets/local-dev-environment.js"],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
Expand Down
2 changes: 0 additions & 2 deletions scripts/postbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
import { getOptionsObjet, save } from './utils'
import { renameSync, readFileSync } from 'fs'
import { createShareAssetsFolder } from './moveToShareFolder.postbuild'
import { replaceEnvPlaceholder } from './runtime-environment-setter.postbuild'

const glob = require('glob')
// Run updates on index.html files across languages
Expand All @@ -17,7 +16,6 @@ glob
.forEach((file) => {
const options = getOptionsObjet(file)
let data = readFileSync(file, 'utf8')
data = replaceEnvPlaceholder(data)
// data = uniqueLength(data, options) DISABLED unique leght for now, as migth not be required anymore
data = buildInfo(data, options)
// data = newRelic(data, options) TEMPORALLY DISABLE NEW RELIC
Expand Down
3 changes: 1 addition & 2 deletions scripts/runtime-environment-setter.dev-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ import { runtimeEnvironmentScript } from './utils'
function main() {
// Create the script content
const scriptContent = `//DO NOT MODIFY THIS environment file directly, to updat this file.
//To update environments please update the files under "/Users/l.mendoza/code/orcid-angular/src/environments"
//To update environments please update the files under "/src/environments"
${runtimeEnvironmentScript()}`

// Write the file. For example, dist/local-dev-environment.js
const outputPath = path.resolve(
__dirname,
'../src/assets/local-dev-environment.js'
Expand Down
22 changes: 0 additions & 22 deletions scripts/runtime-environment-setter.postbuild.ts

This file was deleted.

3 changes: 1 addition & 2 deletions src/app/cdk/platform-info/browserlist.regexp.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
// tslint:disable-next-line: max-line-length
export const BROWSERLIST_REGEXP =
/((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(13[_.]4|13[_.]([5-9]|\d{2,})|13[_.]7|13[_.]([8-9]|\d{2,})|(1[4-9]|[2-9]\d|\d{3,})[_.]\d+|14[_.]0|14[_.]([1-9]|\d{2,})|14[_.]4|14[_.]([5-9]|\d{2,})|14[_.]8|14[_.](9|\d{2,})|(1[5-9]|[2-9]\d|\d{3,})[_.]\d+|15[_.]0|15[_.]([1-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})[_.]\d+|16[_.]0|16[_.]([1-9]|\d{2,})|(1[7-9]|[2-9]\d|\d{3,})[_.]\d+|17[_.]0|17[_.]([1-9]|\d{2,})|(1[8-9]|[2-9]\d|\d{3,})[_.]\d+)(?:[_.]\d+)?)|((?:Chrome).*OPR\/(74|(7[5-9]|[8-9]\d|\d{3,}))\.\d+\.\d+)|(Edge\/(80|(8[1-9]|9\d|\d{3,})|83|(8[4-9]|9\d|\d{3,}))(?:\.\d+)?)|((Chromium|Chrome)\/(80|(8[1-9]|9\d|\d{3,})|83|(8[4-9]|9\d|\d{3,}))\.\d+(?:\.\d+)?)|(Version\/(13\.1|13\.([2-9]|\d{2,})|(1[4-9]|[2-9]\d|\d{3,})\.\d+|14\.0|14\.([1-9]|\d{2,})|(1[5-9]|[2-9]\d|\d{3,})\.\d+|15\.0|15\.([1-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+|16\.0|16\.([1-9]|\d{2,})|(1[7-9]|[2-9]\d|\d{3,})\.\d+|17\.0|17\.([1-9]|\d{2,})|(1[8-9]|[2-9]\d|\d{3,})\.\d+)(?:\.\d+)? Safari\/)|(Firefox\/(78|(79|[8-9]\d|\d{3,}))\.\d+\.\d+)|(Firefox\/(78|(79|[8-9]\d|\d{3,}))\.\d+(pre|[ab]\d+[a-z]*)?)/
export const BROWSERLIST_REGEXP = /((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(13[_.]4|13[_.]([5-9]|\d{2,})|13[_.]7|13[_.]([8-9]|\d{2,})|(1[4-9]|[2-9]\d|\d{3,})[_.]\d+|14[_.]0|14[_.]([1-9]|\d{2,})|14[_.]4|14[_.]([5-9]|\d{2,})|14[_.]8|14[_.](9|\d{2,})|(1[5-9]|[2-9]\d|\d{3,})[_.]\d+|15[_.]0|15[_.]([1-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})[_.]\d+|16[_.]0|16[_.]([1-9]|\d{2,})|(1[7-9]|[2-9]\d|\d{3,})[_.]\d+|17[_.]0|17[_.]([1-9]|\d{2,})|(1[8-9]|[2-9]\d|\d{3,})[_.]\d+)(?:[_.]\d+)?)|((?:Chrome).*OPR\/(74|(7[5-9]|[8-9]\d|\d{3,}))\.\d+\.\d+)|(Edge\/(80|(8[1-9]|9\d|\d{3,})|83|(8[4-9]|9\d|\d{3,}))(?:\.\d+)?)|((Chromium|Chrome)\/(80|(8[1-9]|9\d|\d{3,})|83|(8[4-9]|9\d|\d{3,}))\.\d+(?:\.\d+)?)|(Version\/(13\.1|13\.([2-9]|\d{2,})|(1[4-9]|[2-9]\d|\d{3,})\.\d+|14\.0|14\.([1-9]|\d{2,})|(1[5-9]|[2-9]\d|\d{3,})\.\d+|15\.0|15\.([1-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+|16\.0|16\.([1-9]|\d{2,})|(1[7-9]|[2-9]\d|\d{3,})\.\d+|17\.0|17\.([1-9]|\d{2,})|(1[8-9]|[2-9]\d|\d{3,})\.\d+)(?:\.\d+)? Safari\/)|(Firefox\/(78|(79|[8-9]\d|\d{3,}))\.\d+\.\d+)|(Firefox\/(78|(79|[8-9]\d|\d{3,}))\.\d+(pre|[ab]\d+[a-z]*)?)/
4 changes: 0 additions & 4 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@

<link rel="icon" type="image/x-icon" href="./assets/icons/favicon.ico" />
<!-- NEW_RELIC_PLACEHOLDER -->
<!-- ENV_SCRIPT_PLACEHOLDER -->
<script src="./assets/local-dev-environment.js"></script>
<!-- /ENV_SCRIPT_PLACEHOLDER -->
<script></script>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
Expand Down

0 comments on commit 6237024

Please sign in to comment.