diff --git a/.travis.yml b/.travis.yml index d77ebc86891..7b5f17f8b23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -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 diff --git a/freshCraTemplateUpdate.sh b/freshCraTemplateUpdate.sh new file mode 100755 index 00000000000..f6842a64205 --- /dev/null +++ b/freshCraTemplateUpdate.sh @@ -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 +# 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 diff --git a/packages/react-scripts/template/.travis.yml b/packages/react-scripts/template/.travis.yml index 16e9793b770..e41f7b56df4 100644 --- a/packages/react-scripts/template/.travis.yml +++ b/packages/react-scripts/template/.travis.yml @@ -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