Skip to content

Commit f337836

Browse files
committed
fixup! chore: use fallback resolver for new tags
1 parent f975bbe commit f337836

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.ado/scripts/prepublish-check.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,9 @@ function getTagForStableBranch(branch, { tag }, log) {
153153
if (currentVersion < latestVersion) {
154154
const npmTag = "v" + branch;
155155
log(`Expected npm tag: ${npmTag}`);
156-
// If we're demoting a branch, we will need to create a new tag that will
157-
// not available in any npm feed
156+
// If we're demoting a branch, we will need to create a new tag. This will
157+
// make Nx trip if we don't specify a fallback. In all other scenarios, the
158+
// tags should exist and therefore prefer it to fail.
158159
return { npmTag, isNewTag: true };
159160
}
160161

@@ -233,6 +234,9 @@ function enablePublishing(config, currentBranch, { npmTag: tag, prerelease, isNe
233234
generatorOptions.currentVersionResolverMetadata.tag = tag;
234235
}
235236

237+
// If we're demoting a branch, we will need to create a new tag. This will
238+
// make Nx trip if we don't specify a fallback. In all other scenarios, the
239+
// tags should exist and therefore prefer it to fail.
236240
if (isNewTag) {
237241
if (generatorOptions.fallbackCurrentVersionResolver !== "disk") {
238242
errors.push("'release.version.generatorOptions.fallbackCurrentVersionResolver' must be set to 'disk'");

0 commit comments

Comments
 (0)