Skip to content

Commit

Permalink
two separate builds for branches and tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Molly Lloyd committed Aug 15, 2017
1 parent a6e7730 commit faa6d2a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
19 changes: 12 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,15 @@ workflows:
- build:
filters:
tags:
only: /v[0-9]+.[0-9]+.[0-9]+(-dev)?/
- release:
requires:
- build
ignore: /v[0-9]+.[0-9]+.[0-9]+(-dev)?/
- build-and-release:
filters:
tags:
only: /v[0-9]+.[0-9]+.[0-9]+(-dev)?/
branches:
ignore: /.*/


jobs:
build:
docker:
Expand Down Expand Up @@ -44,10 +43,11 @@ jobs:
path: "test/integration/render-tests/index.html"
- store_artifacts:
path: "test/integration/query-tests/index.html"
release:
build-and-release:
docker:
- image: mbgl/ci:r4-linux-gl-js
working_directory: ~/mapbox-gl-js
resource_class: large
steps:
- checkout
- restore_cache:
Expand All @@ -62,8 +62,13 @@ jobs:
- '.eslintcache'
- 'node_modules'
- run:
name: build-release
command: yarn run build-min
name: run tests
command: |
bash ./.circleci/test.sh
- store_artifacts:
path: "test/integration/render-tests/index.html"
- store_artifacts:
path: "test/integration/query-tests/index.html"
- run:
name: deploy
when: on_success
Expand Down
6 changes: 0 additions & 6 deletions .circleci/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
#!/bin/bash

set -eu
set -o pipefail

PACKAGE_JSON_VERSION=`node -e "console.log(require('./package.json').version)"`

echo $PACKAGE_JSON_VERSION
echo $CIRCLE_TAG

if [ -z $CIRCLE_TAG ]; then
echo '$CIRCLE_TAG must be set'
Expand Down

0 comments on commit faa6d2a

Please sign in to comment.