Remove the -es5/-legacy special handling in the gulp wintersmith task (PR 12978 follow-up)

With the stable version now being `2.8.335`, this work-around is no longer necessary.
This commit is contained in:
Jonas Jenwald 2021-05-30 16:08:54 +02:00
parent d05f4c620e
commit 13dbbdcfb0
2 changed files with 2 additions and 16 deletions

View File

@ -54,8 +54,8 @@ Before downloading PDF.js please take a moment to understand the different layer
Includes the generic build of PDF.js and the viewer. Includes the generic build of PDF.js and the viewer.
</p> </p>
<span class="GROUP_CLASS"> <span class="GROUP_CLASS">
<a type="button" class="btn btn-primary" href="https://github.com/mozilla/pdf.js/releases/download/vSTABLE_VERSION/pdfjs-STABLE_VERSION_LEGACY-dist.zip">Stable (vSTABLE_VERSION)</a> <a type="button" class="btn btn-primary" href="https://github.com/mozilla/pdf.js/releases/download/vSTABLE_VERSION/pdfjs-STABLE_VERSION-legacy-dist.zip">Stable (vSTABLE_VERSION)</a>
<a type="button" class="btn btn-warning HIDDEN_CLASS" href="https://github.com/mozilla/pdf.js/releases/download/vBETA_VERSION/pdfjs-BETA_VERSION_LEGACY-dist.zip">Beta (vBETA_VERSION)</a> <a type="button" class="btn btn-warning HIDDEN_CLASS" href="https://github.com/mozilla/pdf.js/releases/download/vBETA_VERSION/pdfjs-BETA_VERSION-legacy-dist.zip">Beta (vBETA_VERSION)</a>
</span> </span>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">

View File

@ -1907,20 +1907,6 @@ gulp.task("wintersmith", function (done) {
} }
const { stableVersion, betaVersion } = config; const { stableVersion, betaVersion } = config;
// Create appropriate file names for the legacy builds. This logic can be
// removed and/or simplified, once the stable version is past the cutoff.
const CUTOFF_VERSION = "2.7.570";
replaceInFile(
GH_PAGES_DIR + "/getting_started/index.html",
/STABLE_VERSION_LEGACY/g,
stableVersion + (stableVersion <= CUTOFF_VERSION ? "-es5" : "-legacy")
);
replaceInFile(
GH_PAGES_DIR + "/getting_started/index.html",
/BETA_VERSION_LEGACY/g,
betaVersion + (betaVersion <= CUTOFF_VERSION ? "-es5" : "-legacy")
);
replaceInFile( replaceInFile(
GH_PAGES_DIR + "/getting_started/index.html", GH_PAGES_DIR + "/getting_started/index.html",
/STABLE_VERSION/g, /STABLE_VERSION/g,