From 2a1082b9dc21cf42ee93a973db54f0e0798dc5a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Albela=20P=C3=A9rez?= <3659067+davidalbela@users.noreply.github.com> Date: Tue, 10 Mar 2020 17:58:52 +0100 Subject: [PATCH] Fix NODE_ENV development definition - Define develop build for development branches. - Use POSIX standard to call shell scripts in travis file. --- .travis.yml | 4 ++-- config/travis/build.sh | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 63d0e66e..f1770681 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ before_install: # Install truffle - yarn global add truffle script: - - bash ./config/travis/build.sh + - ./config/travis/build.sh after_success: # Pull Request - Deploy it to a review environment # Travis doesn't do deploy step with pull requests builds @@ -69,6 +69,6 @@ deploy: on: tags: true - provider: script - script: bash config/travis/prepare_production_deployment.sh + script: ./config/travis/prepare_production_deployment.sh on: tags: true diff --git a/config/travis/build.sh b/config/travis/build.sh index 0b6ca78a..ce089aeb 100644 --- a/config/travis/build.sh +++ b/config/travis/build.sh @@ -2,7 +2,12 @@ export NODE_ENV=production; -if [[ -n "$TRAVIS_TAG" ]]; then export REACT_APP_ENV='production'; fi +if [[ -n "$TRAVIS_TAG" ]]; then + export REACT_APP_ENV='production'; +elif [[ "$TRAVIS_BRANCH" == "development" ]]; + export NODE_ENV=development; +fi + yarn lint:check yarn prettier:check