forked from bids-standard/legacy-validator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
52 lines (49 loc) · 1.62 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
machine:
node:
version: 8.9.0
general:
artifacts:
- "~/web_version"
dependencies:
override:
- rm -rf node_modules/
- npm install
test:
override:
# Lint
- npm run lint
# Run unit tests
- npm run test
# Smoke tests
- bin/bids-validator tests/data/valid_headers/ --ignoreNiftiHeaders
- bin/bids-validator tests/data/valid_headers/ --ignoreNiftiHeaders --json
# Test gh-pages build
- rm -rf node_modules/
- git checkout gh-pages
- npm install
- if [ -z ${CIRCLE_PR_USERNAME}]; then npm install ${CIRCLE_REPOSITORY_URL}.git\#${CIRCLE_SHA1}; else npm install git+https://[email protected]/${CIRCLE_PR_USERNAME}/${CIRCLE_PR_REPONAME}.git\#${CIRCLE_SHA1}; fi
- ./node_modules/.bin/gulp build && rsync -av --exclude=".*" --exclude="node_modules" --exclude="src" --exclude="tests" . ~/web_version/
deployment:
production:
tag: /.*/
commands:
# Publish to NPM
- npm install -g npm-cli-login
- npm-cli-login -u $NPM_USERNAME -p $NPM_PASSWORD -e $NPM_EMAIL
- git checkout -f $CIRCLE_TAG
# Set the version number
- sed -i -E "s/0.0.0/$CIRCLE_TAG/" package.json
- npm install publish
- npm run npmPublish
# Update gh-pages demo site
- git config --global user.email circleci@circleci
- git config --global user.name CircleCI
- rm -rf node_modules/
- rm -rf tests/
- git checkout gh-pages -f
- git pull
- npm install
- ./node_modules/.bin/gulp build
- git status
- git commit dist/ --allow-empty -m "Circle CI - validator demo update"
- git push origin gh-pages