Browse Source

💚 fix cache key

main
verzelea 6 years ago
parent
commit
6c44265dfd
  1. 10
      .circleci/config.yml
  2. 3
      .gitignore
  3. 2
      src/common/config.js

10
.circleci/config.yml

@ -7,11 +7,11 @@ jobs:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- yarn-packages-{{ checksum "yarn.lock" }}--{{ .Environment.CACHE_VERSION }}
- yarn-packages-{{ checksum "yarn.lock" }}-{{ .Environment.CACHE_VERSION }}
- yarn-packages - yarn-packages
- run: yarn global add node-gyp && yarn install - run: yarn global add node-gyp && yarn install
- save_cache: - save_cache:
key: yarn-packages-{{ checksum "yarn.lock" }}--{{ .Environment.CACHE_VERSION }}
key: yarn-packages-{{ checksum "yarn.lock" }}-{{ .Environment.CACHE_VERSION }}
paths: paths:
- node_modules - node_modules
test: test:
@ -21,7 +21,7 @@ jobs:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- yarn-packages-{{ checksum "yarn.lock" }}--{{ .Environment.CACHE_VERSION }}
key: yarn-packages-{{ checksum "yarn.lock" }}-{{ .Environment.CACHE_VERSION }}
- run: - run:
- name: Start test - name: Start test
- command : yarn test - command : yarn test
@ -32,7 +32,7 @@ jobs:
- checkout - checkout
- restore_cache: - restore_cache:
keys: keys:
- yarn-packages-{{ checksum "yarn.lock" }}--{{ .Environment.CACHE_VERSION }}
- yarn-packages-{{ checksum "yarn.lock" }}-{{ .Environment.CACHE_VERSION }}
- run: - run:
- name: Build the project - name: Build the project
- command : yarn run build - command : yarn run build
@ -59,7 +59,7 @@ jobs:
command: | command: |
sudo npm install -g --silent netlify-cli sudo npm install -g --silent netlify-cli
ls /tmp ls /tmp
netlify deploy --prod --auth $NETLIFY_AUTH_TOKEN --dir=/tmp/build --site $NETLIFY_SITE_ID
netlify deploy --prod --auth $NETLIFY_TOKEN --dir=/tmp/build --site $NETLIFY_SITE_ID
workflows: workflows:
build_deploy: build_deploy:
jobs: jobs:

3
.gitignore

@ -22,3 +22,6 @@ yarn-error.log*
# Coverage Reports # Coverage Reports
coverage coverage
# Local Netlify folder
.netlify

2
src/common/config.js

@ -1,5 +1,5 @@
export const API_URL = export const API_URL =
process.env.NODE_ENV === "production" process.env.NODE_ENV === "production"
? "https://tobedefined.io/api"
? process.env.PROD_BACK_URL || "URL_HERE"
: "http://localhost:2020/api"; : "http://localhost:2020/api";
export default API_URL; export default API_URL;
Loading…
Cancel
Save