Update extractor to run on every commit
This commit is contained in:
@ -13,14 +13,17 @@ const config = require('../config')
|
||||
const SNIPPETS_PATH = `./${config.snippetPath}`
|
||||
const OUTPUT_PATH = `./${config.snippetDataPath}`
|
||||
|
||||
// Check if running on Travis, only build for cron jobs and custom builds
|
||||
// Terminate if parent commit is a Travis build
|
||||
if (
|
||||
util.isTravisCI() &&
|
||||
process.env['TRAVIS_EVENT_TYPE'] !== 'cron' &&
|
||||
process.env['TRAVIS_EVENT_TYPE'] !== 'api'
|
||||
/^Travis build: \d+/g.test(process.env['TRAVIS_COMMIT_MESSAGE'])
|
||||
) {
|
||||
console.log(`${green('NOBUILD')} snippet extraction terminated, not a cron or api build!`)
|
||||
process.exit(0)
|
||||
console.log(
|
||||
`${green(
|
||||
'NOEXTRACT',
|
||||
)} Snippet extraction terminated, parent commit is a Travis build!`,
|
||||
);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
// Setup everything
|
||||
|
||||
Reference in New Issue
Block a user