From cee78c37698418929c7152801f1c02583a63cc0f Mon Sep 17 00:00:00 2001 From: NowNewStart Date: Fri, 22 Jun 2018 01:39:48 +0200 Subject: [PATCH] add PROD_URL fallback for CI --- .travis.yml | 17 +++-------------- src/renderer/main.js | 3 +++ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index fd14ca5..bd11f6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,13 +1,7 @@ -osx_image: xcode8.3 -sudo: required -dist: trusty language: c matrix: include: - - os: osx - - os: linux - env: CC=clang CXX=clang++ npm_config_clang=1 - compiler: clang + - os: windows cache: directories: - node_modules @@ -18,13 +12,8 @@ addons: packages: - libgnome-keyring-dev - icnsutils -before_install: -- mkdir -p /tmp/git-lfs && curl -L https://github.com/github/git-lfs/releases/download/v1.2.1/git-lfs-$([ - "$TRAVIS_OS_NAME" == "linux" ] && echo "linux" || echo "darwin")-amd64-1.2.1.tar.gz - | tar -xz -C /tmp/git-lfs --strip-components 1 && /tmp/git-lfs/git-lfs pull -- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install --no-install-recommends -y icnsutils graphicsmagick xz-utils; fi install: -- nvm install 7 +- nvm install 9 - curl -o- -L https://yarnpkg.com/install.sh | bash - source ~/.bashrc - npm install -g xvfb-maybe @@ -33,4 +22,4 @@ script: - yarn run build branches: only: - - master +- master \ No newline at end of file diff --git a/src/renderer/main.js b/src/renderer/main.js index 0078aad..796c580 100644 --- a/src/renderer/main.js +++ b/src/renderer/main.js @@ -11,6 +11,9 @@ if (!process.env.IS_WEB) Vue.use(require('vue-electron')) Vue.http = Vue.prototype.$http = axios Vue.config.productionTip = false Vue.prototype.$fs = require('fs-extra') +if (!process.env.PROD_URL) { + process.env.PROD_URL = 'https://dokdrop.whatan.app/api/' +} Vue.prototype.$backend = (process.env.NODE_ENV === 'development') ? process.env.LOCAL_URL : process.env.PROD_URL Vue.prototype.$axios = require('axios')