Optimized scripts

This commit is contained in:
Angelos Chalaris
2018-02-04 20:16:04 +02:00
parent f6a4b7cb64
commit 5694a46fff
8 changed files with 15 additions and 27 deletions

View File

@ -6,9 +6,8 @@ const fs = require('fs-extra');
const cp = require('child_process');
const path = require('path');
const chalk = require('chalk');
// Load helper functions (these are from existing snippets in 30 seconds of code!)
const isTravisCI = () => 'TRAVIS' in process.env && 'CI' in process.env;
if(isTravisCI() && process.env['TRAVIS_EVENT_TYPE'] !== 'cron' && process.env['TRAVIS_EVENT_TYPE'] !== 'api') {
const util = require('./util');
if(util.isTravisCI() && process.env['TRAVIS_EVENT_TYPE'] !== 'cron' && process.env['TRAVIS_EVENT_TYPE'] !== 'api') {
console.log(`${chalk.green('NOBUILD')} Module build terminated, not a cron job or a custom build!`);
process.exit(0);
}