-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
45 lines (45 loc) · 1.39 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
stages:
- name: update
if: branch = master AND type = cron
- name: version
if: branch = master
env:
global:
- GIT_USER_NAME=vue-cli-locales-bot
matrix:
include:
- stage: update
language: python
script: |
if [ -n "$GH_TOKEN" -a -n "$TX_TOKEN" ]; then
git checkout "$TRAVIS_BRANCH"
tx pull --parallel -asf
git add .
git config --local user.name "$GIT_USER_NAME"
git config --local user.email "$GIT_USER_EMAIL"
git commit -m "[tx-bot] updated from transifex"
git push -f -q https://vue-cli-locales-bot:[email protected]/caugner/vue-cli-locales "$TRAVIS_BRANCH" &> /dev/null
fi
- stage: version
language: node_js
node_js:
- node
script: |
UPSTREAM=$(npm view @vue/cli version)
ORIGIN=$(npm view vue-cli-locales version)
if [ "$UPSTREAM" != "$ORIGIN" ]; then
git checkout "$TRAVIS_BRANCH"
git config --local user.name "$GIT_USER_NAME"
git config --local user.email "$GIT_USER_EMAIL"
export TRAVIS_TAG=$(npm version "$UPSTREAM")
git push -f -q --tags https://vue-cli-locales-bot:[email protected]/caugner/vue-cli-locales "$TRAVIS_BRANCH" &> /dev/null
fi
deploy:
provider: npm
email: [email protected]
api_key: $NPM_TOKEN
skip_cleanup: true
on:
tags: true
repo: caugner/vue-cli-locales