未验证 提交 42bddce2 编写于 作者: A Asher

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.
上级 f2a15795
...@@ -4,14 +4,6 @@ node_js: ...@@ -4,14 +4,6 @@ node_js:
services: services:
- docker - docker
before_install:
- export MAJOR_VERSION="2"
- export VSCODE_VERSION="1.41.1"
- export VERSION="$MAJOR_VERSION.$TRAVIS_BUILD_NUMBER"
- export TAG="$VERSION-vsc$VSCODE_VERSION"
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then export MINIFY="true"; fi
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then export PACKAGE="true"; fi
# Don't build on tags because we'll already have built the commit. # Don't build on tags because we'll already have built the commit.
jobs: jobs:
include: include:
......
...@@ -57,16 +57,18 @@ function main() { ...@@ -57,16 +57,18 @@ function main() {
cd "$(dirname "${0}")/.." cd "$(dirname "${0}")/.."
local codeServerVersion="${VERSION:-}" local codeServerVersion="${VERSION:-}"
local vscodeVersion="${VSCODE_VERSION:-}" local vscodeVersion="${VSCODE_VERSION:-1.41.1}"
local ostype="${OSTYPE:-}" local ostype="${OSTYPE:-}"
local package="${PACKAGE:-}" local package="${PACKAGE:-}"
if [[ -z "${codeServerVersion}" ]] ; then if [[ -z "${codeServerVersion}" ]] ; then
>&2 echo "Must set VERSION environment variable"; exit 1 codeServerVersion="2.${TRAVIS_TAG:-${DRONE_TAG:-daily}}"
fi fi
if [[ -z "${vscodeVersion}" ]] ; then local branch="${TRAVIS_BRANCH:-DRONE_BRANCH}"
>&2 echo "Must set VSCODE_VERSION environment variable"; exit 1 if [[ $branch == "master" ]] ; then
export MINIFY="true"
export PACKAGE="true"
fi fi
if [[ "${ostype}" == "darwin"* ]]; then if [[ "${ostype}" == "darwin"* ]]; then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册