Last active
September 28, 2015 04:18
-
-
Save isaacrankin/c636b5032e5dbd416724 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
require('shelljs/global'); | |
// Prevent committing of debug configurations | |
console.log('Performing pre-commit tests...'); | |
if (!which('git')) { | |
echo('Sorry, this script requires git'); | |
process.exit(1); | |
}; | |
// gets contents of staged config file, and run it | |
var config = eval(exec('git show :app/config.js', { silent:true }).output); | |
if(config.DebugServer){ | |
console.error('---> Debug server should not be enabled in app/config.js'); | |
process.exit(1); | |
} | |
console.log('Pre-commit tests passed.'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment