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:
parent
74854fb4cc
commit
19cc9bcded
2 changed files with 32 additions and 28 deletions
29
make.js
29
make.js
|
@ -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');
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue