Last active
November 22, 2017 22:33
-
-
Save leggsimon/fba47077f705afc4493d7a62add3c15f 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 | |
console.log('\x1b[1m','Please wait for linting to run...','\x1b[0m'); | |
console.log('You can','\x1b[1m','skip','\x1b[0m','the precommit hook by running "git commit -n" instead','\x1b[1m', "but beware!",'\x1b[0m'); | |
require('child_process').exec( | |
'make verify', | |
function (error, stdout) { | |
console.log(stdout && 'stdout: ' + stdout); | |
if (error !== null) { | |
console.log('\x1b[31m', error, '\x1b[0m') | |
process.abort(0); | |
} | |
} | |
); |
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 | |
console.log('\x1b[1m','Please wait for tests to run...','\x1b[0m'); | |
console.log('You can','\x1b[1m','skip','\x1b[0m','the precommit hook by running "git commit -n" instead','\x1b[1m', "but beware!",'\x1b[0m'); | |
require('child_process').exec( | |
'make test', | |
function (error, stdout) { | |
console.log(stdout && 'stdout: ' + stdout); | |
if (error !== null) { | |
console.log('\x1b[31m', error, '\x1b[0m') | |
process.abort(0); | |
} | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment