Skip to content

Commit a2ee6c8

Browse files
committed
Don't build on tags
1 parent ef069d9 commit a2ee6c8

File tree

1 file changed

+38
-24
lines changed

1 file changed

+38
-24
lines changed

.travis.yml

+38-24
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,44 @@
11
language: node_js
22
node_js:
3-
- 10.16.0
3+
- 10.16.0
44
services:
5-
- docker
6-
matrix:
7-
include:
8-
- os: linux
9-
dist: trusty
10-
env:
11-
- VSCODE_VERSION="1.38.1" MAJOR_VERSION="2" VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER" TARGET="linux"
12-
- os: linux
13-
dist: trusty
14-
env:
15-
- VSCODE_VERSION="1.38.1" MAJOR_VERSION="2" VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER" TARGET="alpine"
16-
- os: osx
17-
env:
18-
- VSCODE_VERSION="1.38.1" MAJOR_VERSION="2" VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER"
5+
- docker
6+
197
before_install:
20-
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then export MINIFY="true"; fi
21-
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then export PACKAGE="true"; fi
22-
script:
23-
- travis_wait 30 scripts/ci.bash
8+
- export MAJOR_VERSION="2"
9+
- export VSCODE_VERSION="1.38.1"
10+
- export VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER"
11+
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then export MINIFY="true"; fi
12+
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then export PACKAGE="true"; fi
13+
14+
# Don't build on tags because we'll already have built the commit.
15+
jobs:
16+
include:
17+
- name: "Linux build"
18+
os: linux
19+
dist: trusty
20+
env: TARGET="linux"
21+
if: tag IS blank
22+
- name: "Alpine build"
23+
os: linux
24+
dist: trusty
25+
env: TARGET="alpine"
26+
if: tag IS blank
27+
- name: "MacOS build"
28+
os: osx
29+
if: tag IS blank
30+
31+
git:
32+
depth: 3
33+
34+
script: travis_wait 30 scripts/ci.bash
35+
2436
before_deploy:
25-
- echo "$VERSION-vsc$VSCODE_VERSION" "$TRAVIS_COMMIT"
26-
- git config --local user.name "$USER_NAME"
27-
- git config --local user.email "$USER_EMAIL"
28-
- git tag "$VERSION-vsc$VSCODE_VERSION" "$TRAVIS_COMMIT"
37+
- echo "$VERSION-vsc$VSCODE_VERSION" "$TRAVIS_COMMIT"
38+
- git config --local user.name "$USER_NAME"
39+
- git config --local user.email "$USER_EMAIL"
40+
- git tag "$VERSION-vsc$VSCODE_VERSION" "$TRAVIS_COMMIT"
41+
2942
deploy:
3043
provider: releases
3144
file_glob: true
@@ -42,8 +55,9 @@ deploy:
4255
on:
4356
repo: cdr/code-server
4457
branch: master
58+
4559
cache:
4660
yarn: true
4761
timeout: 1000
4862
directories:
49-
- .cache
63+
- .cache

0 commit comments

Comments
 (0)