Skip to content

Commit

Permalink
Check reportMedia in the precommit hook, see #964
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Aug 15, 2020
1 parent 0eb5a37 commit 7da13d9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions js/scripts/hook-pre-commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,23 @@ catch( e ) {
console.log( 'chipper/js/grunt/lint not found' );
}

// Make sure license.json for images/audio is up-to-date
try {
const reportMedia = require( '../../../chipper/js/grunt/reportMedia' );

( async () => {
const success = await reportMedia( repo );

// At the moment reportMedia uses grunt.fail, but we defensively use the return value here in case that changes.
if ( !success ) {
process.exit( 1 );
}
} )();
}
catch( e ) {
console.log( 'chipper/js/grunt/reportMedia not found' );
}

// Run qunit tests if puppeteerQUnit exists in the checked-out SHAs and a test HTML exists.
try {
const puppeteerQUnit = require( '../../../aqua/js/local/puppeteerQUnit' );
Expand Down

0 comments on commit 7da13d9

Please sign in to comment.