-
Notifications
You must be signed in to change notification settings - Fork 14
/
.travis.yml
17 lines (17 loc) · 870 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
language: node_js
node_js:
- "8"
cache:
directories:
- node_modules
yarn: true
before_script: yarn build
script:
- GIT_HASH=$(git rev-parse --short HEAD)
- echo ${GIT_HASH} > version
- cp CONTRIBUTORS contributors
- BUILD_URL=$(npx now --name mybit.io -t $NOW_PROD_TOKEN)
- if [ "$TRAVIS_BRANCH" = "develop" -a ! "$TRAVIS_PULL_REQUEST" = "false" ]; then npx now alias ${BUILD_URL} develop.mybit.io -t $NOW_PROD_TOKEN; fi
- if [ "$TRAVIS_BRANCH" = "develop" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then npx now alias ${BUILD_URL} staging.mybit.io -t $NOW_PROD_TOKEN; fi
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then npx now alias ${BUILD_URL} mybit.io -t $NOW_PROD_TOKEN; fi
- if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then npx now alias ${BUILD_URL} www.mybit.io -t $NOW_PROD_TOKEN; fi