File tree Expand file tree Collapse file tree 5 files changed +59
-87
lines changed
Expand file tree Collapse file tree 5 files changed +59
-87
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ # disable spotlight to ensure we waste no CPU on needless file indexing
2+ sudo mdutil -i off /;
3+
4+ if [[ ! -d ./nvm ]]; then
5+ git clone --depth 1 https://github.com/creationix/nvm.git ./nvm
6+ fi
7+
8+ source ./nvm/nvm.sh && nvm install ${NODE_VERSION}
9+
10+ if [ " $CIRCLE_BRANCH " == " master" ]; then
11+ source ./nvm/nvm.sh && nvm use ${NODE_VERSION} && npm update
12+ else
13+ source ./nvm/nvm.sh && nvm use ${NODE_VERSION} && npm install
14+ fi
Original file line number Diff line number Diff line change 22
33set -eu
44
5- TAG=$CIRCLE_TAG
6- PATH=$PATH :~ /.local/bin
7-
8- if [ -z $TAG ]; then
5+ if [ -z $CIRCLE_TAG ]; then
96 echo ' $CIRCLE_TAG must be set'
107 exit 1
118fi
129
1310function upload {
14- aws s3 cp --acl public-read --content-type $2 dist/$1 s3://mapbox-gl-js/$TAG /$1
15- echo " upload: dist/$1 to s3://mapbox-gl-js/$TAG /$1 "
11+ aws s3 cp --acl public-read --content-type $2 dist/$1 s3://mapbox-gl-js/$CIRCLE_TAG /$1
12+ echo " upload: dist/$1 to s3://mapbox-gl-js/$CIRCLE_TAG /$1 "
1613}
1714
18- cnregions="
19- cn-north-1
20- "
21-
2215function cn_upload {
23- for region in cnregions; do
24- aws s3 cp --region $region --acl public-read --content-type $2 dist/$1 s3://mapbox-gl-js-$region /$TAG /$1
25- echo " upload: dist/$1 to s3://mapbox-gl-js-$region /$TAG /$1 "
26- done
16+ aws s3 cp --region cn-north-1 --acl public-read --content-type $2 dist/$1 s3://mapbox-gl-js-cn-north-1/$CIRCLE_TAG /$1
17+ echo " upload: dist/$1 to s3://mapbox-gl-js-cn-north-1/$CIRCLE_TAG /$1 "
2718}
2819
20+ pip install --user --upgrade awscli
21+ PATH=$( python -m site --user-base) /bin:${PATH}
22+
2923npm run build-dev
3024npm run build-min
3125
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ source ./nvm/nvm.sh
4+ nvm use ${NODE_VERSION}
5+
6+ set -eu
7+ set -o pipefail
8+
9+ # add npm packages to $PATH
10+ PATH=$( pwd) /node_modules/.bin:$PATH
11+
12+ # set up code coverage instrumentation
13+ rm -rf coverage .nyc_output
14+
15+ # run linters
16+ npm run lint
17+
18+ # build and run build tests
19+ npm run build-min
20+ npm run build-dev
21+
22+ # run unit tests
23+ tap --reporter dot --coverage --no-coverage-report test/js/* /* .js test/build/webpack.test.js
24+
25+ # run render tests
26+ istanbul cover --dir .nyc_output --include-pid --report none --print none test/render.test.js &&
27+ istanbul cover --dir .nyc_output --include-pid --report none --print none test/query.test.js
28+
29+ # send coverage report to coveralls
30+ nyc report --reporter=lcov
31+ (node ./node_modules/coveralls/bin/coveralls.js < ./coverage/lcov.info) || true
32+
33+ exit $EXIT_CODE
Original file line number Diff line number Diff line change @@ -10,28 +10,15 @@ dependencies:
1010 cache_directories :
1111 - ' ./nvm'
1212 override :
13- # disable spotlight to ensure we waste no CPU on needless file indexing
14- - if [[ $(uname -s) == 'Darwin' ]]; then sudo mdutil -i off /; fi;
15- - |
16- if [[ ! -d ./nvm ]]; then
17- git clone --depth 1 https://github.com/creationix/nvm.git ./nvm
18- fi
19- - source ./nvm/nvm.sh && nvm install ${NODE_VERSION}
20- - |
21- if [ "$(git symbolic-ref --short -q HEAD)" == "master" ]; then
22- source ./nvm/nvm.sh && nvm use ${NODE_VERSION} && npm update
23- else
24- source ./nvm/nvm.sh && nvm use ${NODE_VERSION} && npm install
25- fi
13+ - ./ci/dependencies.sh
2614test :
2715 override :
28- - ./ci.sh
16+ - ./ci/test .sh
2917deployment :
3018 release :
31- tag : /v[0-9]+\.[0-9]+\.[0-9]+/
19+ tag : /v[0-9]+\.[0-9]+\.[0-9]+(\-dev)? /
3220 commands :
33- - pip install awscli --user
34- - ./deploy.sh
21+ - ./ci/deploy.sh
3522general :
3623 artifacts :
3724 - " node_modules/mapbox-gl-test-suite/render-tests/index.html"
You can’t perform that action at this time.
0 commit comments