Updated scripts and travis to handle cron jobs properly

This commit is contained in:
Angelos Chalaris
2018-01-02 21:20:22 +02:00
parent c45cf0542e
commit ea41326a0f
6 changed files with 28 additions and 6 deletions

View File

@ -6,6 +6,12 @@
const fs = require('fs-extra'),
path = require('path'),
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() && (/^Travis build: \d+/g.test(process.env['TRAVIS_COMMIT_MESSAGE'])) {
console.log(`${chalk.green('NOBUILD')} Tagging terminated, parent commit is a Travis build!`);
process.exit(0);
}
// Set variables for paths
const snippetsPath = './snippets';
// Set variables for script