forked from facebook/create-react-app
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
65 lines (60 loc) · 2.56 KB
/
.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
language: node_js
node_js:
- "16"
before_install:
- git config --global url."https://git@".insteadOf git://
- echo -e "machine github.com\n login $CI_USER_TOKEN" > ~/.netrc
- echo "//familysearch.jfrog.io/familysearch/api/npm/fs-npm-prod-virtual/:_authToken=${NPM_PUBLISH_TOKEN}" >> ~/.npmrc
- echo "@fs:registry=https://familysearch.jfrog.io/familysearch/api/npm/fs-npm-prod-virtual/" >> ~/.npmrc
# because this is a weird monorepo and we cd into and out of directories, this is what worked for travis to publish
- echo "//familysearch.jfrog.io/familysearch/api/npm/fs-npm-prod-virtual/:_authToken=${NPM_PUBLISH_TOKEN}" >> packages/react-scripts/.npmrc
- echo "@fs:registry=https://familysearch.jfrog.io/familysearch/api/npm/fs-npm-prod-virtual/" >> packages/react-scripts/.npmrc
install:
- npm install
- cd packages/react-scripts
- npm install
- cd ../../
script:
- npm test
- node publishPrReleaseAndCreateFreshCraTemplate.js
# ${HOME}/tmp/fresh-cra-template was created in script above
- cd ${HOME}/tmp/fresh-cra-template
# this is necessary so we can do some additional npm installs in the freshCraTemplateUpdate.sh script
- echo "//familysearch.jfrog.io/familysearch/api/npm/fs-npm-prod-virtual/:_authToken=${NPM_PUBLISH_TOKEN}" >> ${HOME}/tmp/fresh-cra-template/.npmrc
- echo "@fs:registry=https://familysearch.jfrog.io/familysearch/api/npm/fs-npm-prod-virtual/" >> ${HOME}/tmp/fresh-cra-template/.npmrc
- CI=true npm test
# Building the app so freshCraTemplateUpdate.sh can publish it
- npm run build
before_deploy: "cd ${TRAVIS_BUILD_DIR}/packages/react-scripts"
deploy:
- provider: script
edge: true
cleanup: false
script: npm run fs-publish -- --allow-earlier-version
on:
branch: frontierMaster
- provider: script
edge: true
cleanup: false
script: npm run fs-publish -- --allow-earlier-version
on:
branch: v7.x
- provider: script
edge: true
cleanup: false
script: npm run fs-publish -- --allow-earlier-version
on:
branch: next
- provider: script
skip_cleanup: true
edge: true
cleanup: false
script: cd ${TRAVIS_BUILD_DIR} && ./freshCraTemplateUpdate.sh
on:
branch: frontierMaster
# This tells travis to not build when the branch is master. This is important to have on our master
# branch as well because anytime we merge upstream changes from facebook, travis builds their whole matrix of 24 different builds.
# We do NOT need or want that to occur. Please leave this branches.except here, even on the master branch
branches:
except:
- master