Skip to content

Commit 42bddce

Browse files
committed
Add defaults for environment variables
So we don't have to keep setting them for each CI and every single step since there doesn't seem to be a way to share them between steps in Drone.
1 parent f2a1579 commit 42bddce

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

.travis.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,6 @@ node_js:
44
services:
55
- docker
66

7-
before_install:
8-
- export MAJOR_VERSION="2"
9-
- export VSCODE_VERSION="1.41.1"
10-
- export VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER"
11-
- export TAG="$VERSION-vsc$VSCODE_VERSION"
12-
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then export MINIFY="true"; fi
13-
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then export PACKAGE="true"; fi
14-
157
# Don't build on tags because we'll already have built the commit.
168
jobs:
179
include:

scripts/ci.bash

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,18 @@ function main() {
5757
cd "$(dirname "${0}")/.."
5858

5959
local codeServerVersion="${VERSION:-}"
60-
local vscodeVersion="${VSCODE_VERSION:-}"
60+
local vscodeVersion="${VSCODE_VERSION:-1.41.1}"
6161
local ostype="${OSTYPE:-}"
6262
local package="${PACKAGE:-}"
6363

6464
if [[ -z "${codeServerVersion}" ]] ; then
65-
>&2 echo "Must set VERSION environment variable"; exit 1
65+
codeServerVersion="2.${TRAVIS_TAG:-${DRONE_TAG:-daily}}"
6666
fi
6767

68-
if [[ -z "${vscodeVersion}" ]] ; then
69-
>&2 echo "Must set VSCODE_VERSION environment variable"; exit 1
68+
local branch="${TRAVIS_BRANCH:-DRONE_BRANCH}"
69+
if [[ $branch == "master" ]] ; then
70+
export MINIFY="true"
71+
export PACKAGE="true"
7072
fi
7173

7274
if [[ "${ostype}" == "darwin"* ]]; then

0 commit comments

Comments
 (0)