forked from shutterstock/public-api-sdk-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
30 lines (27 loc) · 957 Bytes
/
.travis.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
language: generic
if: branch = master
services:
- docker
before_install:
- docker build -t sdk-generator .
- CID=`docker run -d -ti --rm sdk-generator:latest`
- docker cp $CID:/opt/node-sdk/dist ./dist
- docker kill $CID
script:
- git config user.email [email protected]
- git config user.name shutterbot
- git clone https://$GH_USER:[email protected]/shutterstock/public-api-javascript-sdk.git
- cp -r ./dist/src ./public-api-javascript-sdk
- cp ./dist/package.json ./public-api-javascript-sdk
- cp ./dist/README.md ./public-api-javascript-sdk
- sed -i 's/\[\[String\]\](String.md)/[String]/g' ./dist/docs/*.md
- cp -r ./dist/docs ./public-api-javascript-sdk
- cd ./public-api-javascript-sdk
- nvm install 10
- nvm use 10
- yarn install
- yarn run lint || travis_terminate 1;
- yarn run test || travis_terminate 1;
- git add .
- git commit --allow-empty -m "Updating JavaScript SDK"
- git push