Skip to content

Commit 1384ea8

Browse files
authored
[compiler] Update release script for latest tag (facebook#34763)
Updates our release script so we can publish to the `latest` tag.
1 parent 3025aa3 commit 1384ea8

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

compiler/scripts/release/publish.js

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ async function main() {
6868
.option('tag', {
6969
description: 'Tag to publish to npm',
7070
type: 'choices',
71-
choices: ['experimental', 'beta', 'rc'],
71+
choices: ['experimental', 'beta', 'rc', 'latest'],
7272
default: 'experimental',
7373
})
7474
.option('tag-version', {
@@ -181,21 +181,9 @@ async function main() {
181181
if (otp != null) {
182182
opts.push(`--otp=${otp}`);
183183
}
184-
/**
185-
* Typically, the `latest` tag is reserved for stable package versions. Since the the compiler
186-
* is still pre-release, until we have a stable release let's only add the
187-
* `latest` tag to non-experimental releases.
188-
*
189-
* `latest` is added by default, so we only override it for experimental releases so that
190-
* those don't get the `latest` tag.
191-
*
192-
* TODO: Update this when we have a stable release.
193-
*/
194-
if (argv.tag === 'experimental') {
195-
opts.push('--tag=experimental');
196-
} else {
197-
opts.push('--tag=latest');
198-
}
184+
185+
opts.push(`--tag=${argv.tag}`);
186+
199187
try {
200188
await spawnHelper(
201189
'npm',

0 commit comments

Comments
 (0)