Updated for cron jobs

This commit is contained in:
Angelos Chalaris
2018-01-02 17:49:07 +02:00
parent c8c6f08643
commit d451f85e8d
2 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,7 @@ script:
- npm run linter
- npm run builder
- npm run webber
- npm run module
after_success:
- chmod +x .travis/push.sh
- .travis/push.sh

View File

@ -1,6 +1,11 @@
/*
Builds the `_30s` module.
*/
const isTravisCI = () => 'TRAVIS' in process.env && 'CI' in process.env;
if(isTravisCI && process.env['TRAVIS_EVENT_TYPE'] !== 'cron') {
console.log(`${chalk.green('NOBUILD')} Build terminated, not a cron job!`);
process.exit(0);
}
// Load modules
const fs = require('fs-extra');
const cp = require('child_process');