Merge pull request #10534 from Snuffleupagus/dist-link

Try to hack-around the broken `pdfjs-dist` links, such that they will point to the main library releases (issue 10391)
This commit is contained in:
Tim van der Meij 2019-02-10 15:14:59 +01:00 committed by GitHub
commit 6757b6e2d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1336,6 +1336,16 @@ gulp.task('dist-repo-git', gulp.series('dist-pre', function (done) {
console.log('### Committing changes');
var reason = process.env['PDFJS_UPDATE_REASON'];
// Attempt to work-around the broken link, see https://github.com/mozilla/pdf.js/issues/10391
if (typeof reason === 'string') {
var reasonParts =
/^(See )(mozilla\/pdf\.js)@tags\/(v\d+\.\d+\.\d+)\s*$/.exec(reason);
if (reasonParts) {
reason = reasonParts[1] + 'https://github.com/' + reasonParts[2] +
'/releases/tag/' + reasonParts[3];
}
}
var message = 'PDF.js version ' + VERSION + (reason ? ' - ' + reason : '');
safeSpawnSync('git', ['add', '*'], { cwd: DIST_DIR, });
safeSpawnSync('git', ['commit', '-am', message], { cwd: DIST_DIR, });