From 651a3785213d2e9c755c892098b0fa1b206ae4fb Mon Sep 17 00:00:00 2001 From: Nikolay Vitkov <34244704+Lightning00Blade@users.noreply.github.com> Date: Tue, 6 Jun 2023 17:38:58 +0200 Subject: [PATCH] ci: fix Chrome auto-roller (#10330) --- tools/update_chrome_revision.mjs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/update_chrome_revision.mjs b/tools/update_chrome_revision.mjs index d0a6fde6923..59fed665c25 100644 --- a/tools/update_chrome_revision.mjs +++ b/tools/update_chrome_revision.mjs @@ -126,16 +126,16 @@ async function updateVersionFileLastMaintained(currentVersion, updateVersion) { VERSIONS_PER_RELEASE_COMMENT, `${VERSIONS_PER_RELEASE_COMMENT}\n ['${version}', 'NEXT'],` ); + + const lastMaintainedIndex = versions.indexOf(lastMaintainedChromeVersion); + const nextMaintainedVersion = versions[lastMaintainedIndex - 1]; + + await replaceInFile( + './versions.js', + `const lastMaintainedChromeVersion = '${lastMaintainedChromeVersion}';`, + `const lastMaintainedChromeVersion = '${nextMaintainedVersion}';` + ); } - - const lastMaintainedIndex = versions.indexOf(lastMaintainedChromeVersion); - const nextMaintainedVersion = versions[lastMaintainedIndex - 1]; - - await replaceInFile( - './versions.js', - `const lastMaintainedChromeVersion = '${lastMaintainedChromeVersion}';`, - `const lastMaintainedChromeVersion = '${nextMaintainedVersion}';` - ); } const {version, revision} = await getVersionAndRevisionForStable();