Skip to content

Commit a664f5f

Browse files
authored
[compiler] Fix incorrect version name (facebook#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). * facebook#34765 * __->__ facebook#34764
1 parent 1384ea8 commit a664f5f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

compiler/scripts/release/publish.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,10 +145,15 @@ async function main() {
145145
files: {exclude: ['.DS_Store']},
146146
});
147147
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+
}
152157
if (argv.tag === 'experimental' || argv.tag === 'beta') {
153158
newVersion = `${newVersion}-${truncatedHash}-${dateString}`;
154159
}

0 commit comments

Comments
 (0)