From 62869803272c43215d9959e45cb612f06c1ebd73 Mon Sep 17 00:00:00 2001 From: ziajka Date: Mon, 9 Apr 2018 15:24:41 +0200 Subject: [PATCH] Fix issue with wrong base-href for github.io --- .angular-cli.json | 3 ++- .travis.yml | 2 +- package.json | 1 + src/environments/environment.github.prod.ts | 5 +++++ src/environments/environment.ts | 3 ++- src/index.html | 15 ++++++++++----- 6 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 src/environments/environment.github.prod.ts diff --git a/.angular-cli.json b/.angular-cli.json index 48095acf..1112b26e 100644 --- a/.angular-cli.json +++ b/.angular-cli.json @@ -29,7 +29,8 @@ "dev": "environments/environment.ts", "prod": "environments/environment.prod.ts", "electronProd": "environments/environment.electron.prod.ts", - "electronDev": "environments/environment.electron.ts" + "electronDev": "environments/environment.electron.ts", + "githubProd": "environments/environment.github.prod.ts" } } ], diff --git a/.travis.yml b/.travis.yml index 5ba78461..80362253 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,7 +55,7 @@ after_script: # greenkeeper-lockfile support - greenkeeper-lockfile-upload # publish on gns3.github.io - - yarn ng build --base-href /${TRAVIS_BRANCH}/ + - yarn buildforgithub --base-href /${TRAVIS_BRANCH}/ - export GIT_LAST_LOG="$(git log -1 --pretty=%B)" - git clone https://${GITHUB_CREDENTIALS}@github.com/GNS3/gns3.github.io.git github-pages - mkdir -p github-pages/${TRAVIS_BRANCH} diff --git a/package.json b/package.json index f0ab17e2..05ce9bdb 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "startforelectron": "ng serve -e electronDev", "build": "ng build", "buildforelectron": "ng build -e electronProd", + "buildforgithub": "ng build -e githubProd", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e", diff --git a/src/environments/environment.github.prod.ts b/src/environments/environment.github.prod.ts new file mode 100644 index 00000000..bca92dff --- /dev/null +++ b/src/environments/environment.github.prod.ts @@ -0,0 +1,5 @@ +export const environment = { + production: true, + electron: false, + githubio: true +}; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 99a525bc..c7e44b00 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -5,5 +5,6 @@ export const environment = { production: false, - electron: false + electron: false, + githubio: false }; diff --git a/src/index.html b/src/index.html index e1bc473d..503e1aa1 100644 --- a/src/index.html +++ b/src/index.html @@ -3,15 +3,20 @@ GNS3 Web UI Demo + + +