From ad9d48136d83e349af0a04f6d25c79ee37bd7fe0 Mon Sep 17 00:00:00 2001 From: xxyzz Date: Tue, 11 Dec 2018 11:27:45 +0800 Subject: [PATCH] move commands to publish.sh --- .travis.yml | 3 --- publish.sh | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 41cf0745..57f6ef96 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,9 +16,6 @@ install: script: - npm run lint - - json="export const environment = { production: true, server: 'https://server.kahla.app' };" - - echo Writting JSON: \"$json\" - - echo $json > ./src/environments/environment.prod.ts - ./publish.sh deploy: diff --git a/publish.sh b/publish.sh index 98a73fdf..9c5646d8 100755 --- a/publish.sh +++ b/publish.sh @@ -1,5 +1,12 @@ #!/bin/bash +if [[ -z "${GH_TOKEN}" ]] +then + json="export const environment = { production: true, server: 'https://server.kahla.app' };" + echo Writting JSON: \"$json\" + echo $json > ./src/environments/environment.prod.ts +fi + rm -rf ./www/ rm -rf ./dist/ npm run prod-electron