diff --git a/.travis/push.sh b/.travis/push.sh index 9f5d53602..0cd1495b3 100755 --- a/.travis/push.sh +++ b/.travis/push.sh @@ -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 diff --git a/scripts/build.js b/scripts/build.js index 879b8e9bf..eaab7dff8 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -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'; diff --git a/scripts/lint.js b/scripts/lint.js index 833ef3dbd..43a5d6546 100644 --- a/scripts/lint.js +++ b/scripts/lint.js @@ -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'; diff --git a/scripts/module.js b/scripts/module.js index cd812d7d1..254afdeaa 100644 --- a/scripts/module.js +++ b/scripts/module.js @@ -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 diff --git a/scripts/tag.js b/scripts/tag.js index 2c8ed9b0a..14fb053f0 100644 --- a/scripts/tag.js +++ b/scripts/tag.js @@ -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 diff --git a/scripts/web.js b/scripts/web.js index ac72efc54..841faac15 100644 --- a/scripts/web.js +++ b/scripts/web.js @@ -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(