Skip to content
This repository has been archived by the owner on Nov 29, 2020. It is now read-only.

Commit

Permalink
Updated ci-build scripts to return proper status codes
Browse files Browse the repository at this point in the history
  • Loading branch information
prefixaut committed Oct 3, 2019
1 parent e840f26 commit abb3886
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 19 deletions.
25 changes: 6 additions & 19 deletions .travis.yml
Expand Up @@ -35,33 +35,20 @@ notifications:
email: false

before_script:
- |
if [ "$DO_COVERAGE" == "true" ]; then
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
fi
- if [ "$DO_COVERAGE" == "true" ]; then curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter fi
- if [ "$DO_COVERAGE" == "true" ]; then chmod +x ./cc-test-reporter fi
- if [ "$DO_COVERAGE" == "true" ]; then ./cc-test-reporter before-build fi

script:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
if [ "$IS_DOCKER" == "true" ]; then
docker run --rm \
--env-file <(env | grep -vE '\r|\n' | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_') \
-v ${PWD}:/project \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:wine \
/bin/bash -c "yarn install --link-duplicates --pure-lockfile && yarn test:unit && yarn build --publish=onTag --linux --win"
./ci/build-docker.sh
else
yarn
yarn test:unit:coverage
yarn build --publish=onTag --linux
./ci/build-unix.sh
fi
else
yarn
yarn test:unit:coverage
yarn build --publish=onTag --mac
./ci/build-mac.sh
fi
after_script:
Expand Down
7 changes: 7 additions & 0 deletions ci/build-docker.sh
@@ -0,0 +1,7 @@
docker run --rm \
--env-file <(env | grep -vE '\r|\n' | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_') \
-v ${PWD}:/project \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:wine \
/bin/bash -c "yarn install --link-duplicates --pure-lockfile && yarn test:unit && yarn build --publish=onTag --linux --win"
14 changes: 14 additions & 0 deletions ci/build-mac.sh
@@ -0,0 +1,14 @@
yarn
if [ $? -ne 0 ]; then
exit $0
fi

yarn test:unit
if [ $? -ne 0 ]; then
exit $0
fi

yarn build --publish=onTag --mac
if [ $? -ne 0 ]; then
exit $0
fi
14 changes: 14 additions & 0 deletions ci/build-unix.sh
@@ -0,0 +1,14 @@
yarn
if [ $? -ne 0 ]; then
exit $0
fi

yarn test:unit:coverage
if [ $? -ne 0 ]; then
exit $0
fi

yarn build --publish=onTag --linux
if [ $? -ne 0 ]; then
exit $0
fi

0 comments on commit abb3886

Please sign in to comment.