@samitouri / QOS-React-2 / commits / a664f5f2ee

[compiler] Fix incorrect version name (#34764)

Script was using the wrong version name. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/34764). * #34765 * __->__ #34764

lauren committed Oct 7, 2025 at 14:32 UTC a664f5f2ee225eab810fb1a1cc36de3a68bbf47c
1 file changed +9 -4
compiler/scripts/release/publish.js
+9 -4
@@ -145,10 +145,15 @@ async function main() {
145 files: {exclude: ['.DS_Store']},
146 });
147 const truncatedHash = hash.slice(0, 7);
148 - let newVersion =
149 - argv.tagVersion == null || argv.tagVersion === ''
150 - ? `${argv.versionName}-${argv.tag}`
151 - : `${argv.versionName}-${argv.tag}.${argv.tagVersion}`;
148 + let newVersion;
149 + if (argv.tag === 'latest') {
150 + newVersion = argv.versionName;
151 + } else {
152 + newVersion =
153 + argv.tagVersion == null || argv.tagVersion === ''
154 + ? `${argv.versionName}-${argv.tag}`
155 + : `${argv.versionName}-${argv.tag}.${argv.tagVersion}`;
156 + }
157 if (argv.tag === 'experimental' || argv.tag === 'beta') {
158 newVersion = `${newVersion}-${truncatedHash}-${dateString}`;
159 }