Skip to content

Commit

Permalink
Merge pull request #10534 from Snuffleupagus/dist-link
Browse files Browse the repository at this point in the history
Try to hack-around the broken `pdfjs-dist` links, such that they will point to the main library releases (issue 10391)
  • Loading branch information
timvandermeij authored Feb 10, 2019
2 parents eb7fc26 + 62d7332 commit 6757b6e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, });
Expand Down

0 comments on commit 6757b6e

Please sign in to comment.