Transport OS ENV into environment.prod.ts

This commit is contained in:
ziajka 2019-01-25 13:48:22 +01:00
parent c1bdce4fce
commit ef38319b5f
5 changed files with 20 additions and 5 deletions

3
.gitignore vendored
View File

@ -52,3 +52,6 @@ Thumbs.db
# Licenses file
licenses.csv
# Temps
.temp-var-file.ts

View File

@ -32,7 +32,9 @@
"prettier:base": "prettier",
"prettier:check": "yarn prettier:base -- --list-different \"src/**/*.{ts,js,html,scss}\"",
"prettier:write": "yarn prettier:base -- --write \"src/**/*.{ts,js,html,scss}\"",
"generate-licenses-file": "yarn license-checker --production --csv --out licenses.csv"
"generate-licenses-file": "yarn license-checker --production --csv --out licenses.csv",
"prebuild": "node set-variables-in-env.js --set src/environments/environment.prod.ts",
"postbuild": "node set-variables-in-env.js --unset src/environments/environment.prod.ts"
},
"private": true,
"dependencies": {
@ -94,6 +96,7 @@
"popper.js": "^1.14.6",
"prettier": "^1.15.2",
"protractor": "~5.4.2",
"replace": "^1.0.1",
"ts-mockito": "^2.3.1",
"ts-node": "~7.0.1",
"tslint": "~5.12.0",

View File

@ -1,5 +1,6 @@
import { Injectable } from '@angular/core';
import { PlatformService } from './platform.service';
import { environment } from '../../environments/environment';
@Injectable()
export class ExternalSoftwareDefinitionService {
@ -19,7 +20,7 @@ export class ExternalSoftwareDefinitionService {
}
getForWindows() {
const software = [{
let software = [{
name: 'Wireshark',
locations: [
'C:\\Program Files\\Wireshark\\Wireshark.exe'
@ -39,13 +40,18 @@ export class ExternalSoftwareDefinitionService {
'SolarPuTTY.exe'
],
type: 'web',
resource: '.exe',
resource: '',
binary: 'SolarPuTTY.exe',
sudo: false,
installation_arguments: ['--only-ask'],
installed: false
};
if(environment.solarputty_download_url) {
solarPutty.resource = environment.solarputty_download_url;
software.push(solarPutty);
}
return software;
}

View File

@ -1,5 +1,7 @@
export const environment = {
/* Below configuration is replaced during build time, don't remove. */
//ENV
production: true,
electron: false,
githubio: false
githubio: false,
};

View File

@ -5,7 +5,8 @@
export const environment = {
production: false,
electron: false,
githubio: false
githubio: false,
solarputty_download_url: ''
};
/*