From 10bbdb8679ca48053dc128befa1a41e8e154ca5a Mon Sep 17 00:00:00 2001 From: Riccardo Cipolleschi Date: Tue, 11 Mar 2025 04:05:11 -0700 Subject: [PATCH] Fix verifyReleaseOnNPM by dropping the v in the version (#49944) Summary: GHA passes the version to the script with a `v` prefix. However, when we receive the version from NPM, the `v` prefix is not here. We can fix the script by dropping the `v` when it is passed to the function. bypass-github-export-checks ## Changelog: [Internal] - Fix verifyPackageOnNPM Pull Request resolved: https://github.com/facebook/react-native/pull/49944 Test Plan: GHA Reviewed By: cortinico, fabriziocucci Differential Revision: D70960414 Pulled By: cipolleschi fbshipit-source-id: 4234103ebe49cf715aea4a1473a8a60978f07a9f --- .github/workflow-scripts/verifyReleaseOnNpm.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflow-scripts/verifyReleaseOnNpm.js b/.github/workflow-scripts/verifyReleaseOnNpm.js index 1472f7950e6..e65cda40123 100644 --- a/.github/workflow-scripts/verifyReleaseOnNpm.js +++ b/.github/workflow-scripts/verifyReleaseOnNpm.js @@ -23,5 +23,8 @@ module.exports.verifyReleaseOnNpm = async ( retries = MAX_RETRIES, ) => { const tag = version.includes('-rc.') ? 'next' : latest ? 'latest' : null; + if (version.startsWith('v')) { + version = version.slice(1); + } await verifyPublishedPackage(REACT_NATIVE_NPM_PKG, version, tag, retries); };