From 6a5ae537dbcf586b72c82d2d5d0fa5b2458fe85e Mon Sep 17 00:00:00 2001 From: "Kent C. Dodds" Date: Fri, 22 Sep 2017 23:07:54 -0600 Subject: [PATCH] fix: add script file --- .travis.yml | 7 ++----- src/scripts/travis-after-success.js | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 src/scripts/travis-after-success.js diff --git a/.travis.yml b/.travis.yml index a71d412c..cb429cb3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,11 +7,8 @@ notifications: email: false node_js: - '8' -script: - - npm run validate -after_success: - - npx codecov - - npx -p semantic-release@7 -c "semantic-release pre && npm publish && semantic-release post" +script: npm run validate +after_success: node src travis-after-success branches: only: - master diff --git a/src/scripts/travis-after-success.js b/src/scripts/travis-after-success.js new file mode 100644 index 00000000..ecf837a6 --- /dev/null +++ b/src/scripts/travis-after-success.js @@ -0,0 +1,16 @@ +const spawn = require('cross-spawn') +const {resolveBin, getConcurrentlyArgs} = require('../utils') + +const result = spawn.sync( + resolveBin('concurrently'), + getConcurrentlyArgs( + { + codecov: `echo installing codecov && npx -p codecov -c 'echo running codecov && codecov'`, + release: `echo installing semantic-release && npx -p semantic-release@8 -c 'echo running semantic-release && semantic-release pre && npm publish && semantic-release post'`, + }, + {killOthers: false}, + ), + {stdio: 'inherit'}, +) + +process.exit(result.status)