Updated scripts and travis to handle cron jobs properly
This commit is contained in:
@ -10,9 +10,9 @@ commit_website_files() {
|
||||
git checkout master
|
||||
git add *
|
||||
if [ $TRAVIS_EVENT_TYPE == "cron" ]; then
|
||||
git commit --message "[cron] Travis build: $TRAVIS_BUILD_NUMBER [ci skip]"
|
||||
git commit --message "Travis build: $TRAVIS_BUILD_NUMBER [cron]"
|
||||
else
|
||||
git commit --message "Travis build: $TRAVIS_BUILD_NUMBER [ci skip]"
|
||||
git commit --message "Travis build: $TRAVIS_BUILD_NUMBER"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -6,7 +6,12 @@
|
||||
const fs = require('fs-extra');
|
||||
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() && (/^Travis build: \d+/g.test(process.env['TRAVIS_COMMIT_MESSAGE'])) {
|
||||
console.log(`${chalk.green('NOBUILD')} README build terminated, parent commit is a Travis build!`);
|
||||
process.exit(0);
|
||||
}
|
||||
const SNIPPETS_PATH = './snippets';
|
||||
const STATIC_PARTS_PATH = './static-parts';
|
||||
|
||||
|
||||
@ -9,7 +9,12 @@ 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() && (/^Travis build: \d+/g.test(process.env['TRAVIS_COMMIT_MESSAGE'])) {
|
||||
console.log(`${chalk.green('NOBUILD')} Linting terminated, parent commit is a Travis build!`);
|
||||
process.exit(0);
|
||||
}
|
||||
const SNIPPETS_PATH = './snippets';
|
||||
const TEMP_PATH = './temp';
|
||||
|
||||
|
||||
@ -8,8 +8,8 @@ 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') {
|
||||
console.log(`${chalk.green('NOBUILD')} Build terminated, not a cron job!`);
|
||||
if(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);
|
||||
}
|
||||
// Set variables for paths
|
||||
|
||||
@ -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
|
||||
|
||||
@ -8,6 +8,12 @@ const fs = require('fs-extra'),
|
||||
chalk = require('chalk'),
|
||||
md = require('markdown-it')(),
|
||||
minify = require('html-minifier').minify;
|
||||
// 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')} index build terminated, parent commit is a Travis build!`);
|
||||
process.exit(0);
|
||||
}
|
||||
// Compile the mini.css framework and custom CSS styles, using `node-sass`.
|
||||
const sass = require('node-sass');
|
||||
sass.render(
|
||||
|
||||
Reference in New Issue
Block a user