Skip to content

Commit d9aaaed

Browse files
authored
[cd] Allow tagging semver-lower releases as @latest if @latest po… (#94627)
1 parent 6f16804 commit d9aaaed

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎scripts/publish-release.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ const cwd = process.cwd()
6565
// during publishing, when users install `next@latest`, they might
6666
// get the backported version instead of the actual "latest" version.
6767
// Therefore, we explicitly set the tag as 'backport' for backports.
68-
tag = 'backport'
68+
// But force @latest tag if we accidentally tagged a prerelase as latest
69+
if (!semver.prerelease(tags.latest)) {
70+
tag = 'backport'
71+
}
6972
}
7073
}
7174
} catch (error) {

0 commit comments

Comments
 (0)