Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- 10
- "10"
before_install:
- echo -e "machine github.com\n login $CI_USER_TOKEN" > ~/.netrc
- echo "//code.lds.org/artifactory/api/npm/npm-fhd/:_authToken=${NPM_PUBLISH_TOKEN}" >> ~/.npmrc
Expand All @@ -18,19 +18,24 @@ script:
- npm test
# test that a new app can be created with these scripts
- mkdir -p ${HOME}/tmp && cd ${HOME}/tmp
- npx create-react-app my-test-app --use-npm --scripts-version file:${TRAVIS_BUILD_DIR}/packages/react-scripts/
- cd my-test-app
- npx create-react-app fresh-cra-template --use-npm --scripts-version file:${TRAVIS_BUILD_DIR}/packages/react-scripts/
- cd fresh-cra-template
- CI=true npm test
- npm run build
- cd ${TRAVIS_BUILD_DIR}
before_deploy: "cd packages/react-scripts"
deploy:
provider: npm
skip_cleanup: true
email: "dl-fh-eng-frontier@groups.ldschurch.org"
api_key: "$NPM_PUBLISH_TOKEN"
on:
branch: frontierMaster
- provider: npm
skip_cleanup: true
email: "dl-fh-eng-frontier@groups.ldschurch.org"
api_key: "$NPM_PUBLISH_TOKEN"
on:
branch: frontierMaster
- provider: script
skip_cleanup: true
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
Expand Down
14 changes: 14 additions & 0 deletions freshCraTemplateUpdate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#! /bin/bash

cd ${HOME}/tmp/my-test-app
# The order of these sed commands is kind of important. The last one of uncommenting all lines needs to occur after
# removing comments explaining in english steps for replacing the binding path
sed -i.bak 's/{{BINDING_PATH}}/fresh-cra-template.frontier/' blueprint.yml
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking @gmdayley might like to link to this as an example?
I wonder if we should make the path something like:
/frontier/fresh
/frontier/cra
/frontier/example
/frontier/sample

We can also decide later and change it easily

# https://stackoverflow.com/questions/5410757/delete-lines-in-a-text-file-that-contain-a-specific-string
sed -i.bak '/Replace/d' blueprint.yml
sed -i.bak '/See/d' blueprint.yml
sed -i.bak 's/#//' blueprint.yml
rm blueprint.yml.bak
git commit -a -m 'putting correct blueprint.yml file in place'
git remote add origin https://github.com/fs-webdev/fresh-cra-template.git
git push --force origin master
2 changes: 1 addition & 1 deletion packages/react-scripts/template/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- 10
- "10"
before_install:
- echo -e "machine github.com\n login $CI_USER_TOKEN" > ~/.netrc
- echo "//code.lds.org/artifactory/api/npm/npm-fhd/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
Expand Down