tools: fix release URL computation in update-root-certs.mjs

Previously this would compute the release tag to be something
like FIREFOX_134_0.2_RELEASE which would not lead to a valid
URL, failing to pull the latest NSS updates from the Firefox
release. It should replace all the dots with underscores to
compute something like FIREFOX_134_0_2_RELEASE instead.

PR-URL: https://github.com/nodejs/node/pull/56843
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
This commit is contained in:
Joyee Cheung 2025-02-14 15:15:14 +01:00 committed by GitHub
parent fc7682ca4b
commit 1e6a6569dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -65,7 +65,7 @@ const getFirefoxRelease = async (version) => {
const getNSSVersion = async (release) => {
const latestFirefox = release.version;
const firefoxTag = `FIREFOX_${latestFirefox.replace('.', '_')}_RELEASE`;
const firefoxTag = `FIREFOX_${latestFirefox.replaceAll('.', '_')}_RELEASE`;
const tagInfoURL = `https://hg.mozilla.org/releases/mozilla-release/raw-file/${firefoxTag}/security/nss/TAG-INFO`;
if (values.verbose) {
console.log(`Fetching NSS tag from ${tagInfoURL}.`);