1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Port the mozcentraldiff target to Gulp

This commit is contained in:
Tim van der Meij 2017-04-27 22:59:45 +02:00
parent 74854fb4cc
commit 19cc9bcded
No known key found for this signature in database
GPG key ID: 8C3FD2925A5F2762
2 changed files with 32 additions and 28 deletions

29
make.js
View file

@ -227,34 +227,7 @@ target.mozcentralbaseline = function() {
};
target.mozcentraldiff = function() {
target.mozcentral();
cd(ROOT_DIR);
echo();
echo('### Creating mozcentral diff');
var MOZCENTRAL_DIFF = BUILD_DIR + 'mozcentral.diff';
if (test('-f', MOZCENTRAL_DIFF)) {
rm(MOZCENTRAL_DIFF);
}
var MOZCENTRAL_BASELINE_DIR = BUILD_DIR + 'mozcentral.baseline';
if (!test('-d', MOZCENTRAL_BASELINE_DIR)) {
echo('mozcentral baseline was not found');
echo('Please build one using "gulp mozcentralbaseline"');
exit(1);
}
cd(MOZCENTRAL_BASELINE_DIR);
exec('git reset --hard');
cd(ROOT_DIR); rm('-rf', MOZCENTRAL_BASELINE_DIR + '/*'); // trying to be safe
cd(MOZCENTRAL_BASELINE_DIR);
cp('-Rf', '../mozcentral/*', '.');
exec('git add -A');
exec('git diff --binary --cached --unified=8', {silent: true}).output.
to('../mozcentral.diff');
echo('Result diff can be found at ' + MOZCENTRAL_DIFF);
execGulp('mozcentraldiff');
};
////////////////////////////////////////////////////////////////////////////////