feat(release): configure when all branches should be checked for a matching releaseTagPattern (#30044)
This commit is contained in:
parent
b821d2954b
commit
b10856bb32
277
e2e/release/src/release-tag-pattern.test.ts
Normal file
277
e2e/release/src/release-tag-pattern.test.ts
Normal file
@ -0,0 +1,277 @@
|
||||
import { NxJsonConfiguration } from '@nx/devkit';
|
||||
import {
|
||||
cleanupProject,
|
||||
newProject,
|
||||
runCLI,
|
||||
runCommandAsync,
|
||||
uniq,
|
||||
updateJson,
|
||||
} from '@nx/e2e/utils';
|
||||
|
||||
expect.addSnapshotSerializer({
|
||||
serialize(str: string) {
|
||||
return (
|
||||
str
|
||||
// Remove all output unique to specific projects to ensure deterministic snapshots
|
||||
.replaceAll(/my-pkg-\d+/g, '{project-name}')
|
||||
.replaceAll(
|
||||
/integrity:\s*.*/g,
|
||||
'integrity: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
|
||||
)
|
||||
.replaceAll(/version-plan-\d*.md/g, 'version-plan-XXX.md')
|
||||
.replaceAll(/\b[0-9a-f]{40}\b/g, '{SHASUM}')
|
||||
.replaceAll(/\d*B index\.js/g, 'XXB index.js')
|
||||
.replaceAll(/\d*B project\.json/g, 'XXB project.json')
|
||||
.replaceAll(/\d*B package\.json/g, 'XXXB package.json')
|
||||
.replaceAll(/size:\s*\d*\s?B/g, 'size: XXXB')
|
||||
.replaceAll(/\d*\.\d*\s?kB/g, 'XXX.XXX kb')
|
||||
.replaceAll(/[a-fA-F0-9]{7}/g, '{COMMIT_SHA}')
|
||||
.replaceAll(/Test @[\w\d]+/g, 'Test @{COMMIT_AUTHOR}')
|
||||
// Normalize the version title date.
|
||||
.replaceAll(/\(\d{4}-\d{2}-\d{2}\)/g, '(YYYY-MM-DD)')
|
||||
// We trim each line to reduce the chances of snapshot flakiness
|
||||
.split('\n')
|
||||
.map((r) => r.trim())
|
||||
.join('\n')
|
||||
);
|
||||
},
|
||||
test(val: string) {
|
||||
return val != null && typeof val === 'string';
|
||||
},
|
||||
});
|
||||
|
||||
describe('nx release releaseTagPattern', () => {
|
||||
let pkg1: string;
|
||||
|
||||
beforeEach(async () => {
|
||||
newProject({
|
||||
packages: ['@nx/js'],
|
||||
});
|
||||
|
||||
pkg1 = uniq('my-pkg-1');
|
||||
runCLI(`generate @nx/workspace:npm-package ${pkg1}`);
|
||||
|
||||
await runCommandAsync(`git add .`);
|
||||
await runCommandAsync(`git commit -m "chore: initial commit"`);
|
||||
}, 60000);
|
||||
|
||||
afterEach(() => cleanupProject());
|
||||
|
||||
describe('releaseTagPatternCheckAllBranchesWhen', () => {
|
||||
it('should check the current branch first, and then fall back to all branches by default/when not specified', async () => {
|
||||
updateJson<NxJsonConfiguration>('nx.json', (nxJson) => {
|
||||
nxJson.release = {
|
||||
releaseTagPattern: 'v{version}',
|
||||
version: {
|
||||
conventionalCommits: true,
|
||||
},
|
||||
};
|
||||
return nxJson;
|
||||
});
|
||||
|
||||
// No tags at all yet
|
||||
expect(
|
||||
runCLI(`release version -d`, {
|
||||
silenceError: true,
|
||||
})
|
||||
).toContain(
|
||||
`No git tags matching pattern "v{version}" for project "${pkg1}" were found`
|
||||
);
|
||||
|
||||
// Create a matching tag on the current branch which should be found by default
|
||||
await runCommandAsync(`git tag -a v1.1.1 -m "v1.1.1"`);
|
||||
|
||||
// Create a matching tag on a different branch, which it should NOT find (because there is already the match on the current branch)
|
||||
await runCommandAsync(`git checkout -b other-branch`);
|
||||
// Update the README.md to create a new commit to tag
|
||||
await runCommandAsync(`echo "Hello" > README.md`);
|
||||
await runCommandAsync(`git add README.md`);
|
||||
await runCommandAsync(`git commit -m "chore: update README.md"`);
|
||||
await runCommandAsync(`git tag -a v2.2.2 -m "v2.2.2"`);
|
||||
|
||||
// Switch back to the original branch
|
||||
await runCommandAsync(`git checkout main`);
|
||||
|
||||
// Finds the tag on the current branch
|
||||
expect(runCLI(`release version -d`)).toContain(
|
||||
`Resolved the current version as 1.1.1 from git tag "v1.1.1"`
|
||||
);
|
||||
|
||||
// Delete the tag on the current branch, now it should find the tag on the other branch
|
||||
await runCommandAsync(`git tag -d v1.1.1`);
|
||||
expect(runCLI(`release version -d`)).toContain(
|
||||
`Resolved the current version as 2.2.2 from git tag "v2.2.2"`
|
||||
);
|
||||
});
|
||||
|
||||
it('should check all branches immediately when releaseTagPatternCheckAllBranchesWhen is true', async () => {
|
||||
updateJson<NxJsonConfiguration>('nx.json', (nxJson) => {
|
||||
nxJson.release = {
|
||||
releaseTagPattern: 'v{version}',
|
||||
releaseTagPatternCheckAllBranchesWhen: true,
|
||||
version: {
|
||||
conventionalCommits: true,
|
||||
},
|
||||
};
|
||||
return nxJson;
|
||||
});
|
||||
|
||||
// No tags at all yet
|
||||
expect(
|
||||
runCLI(`release version -d`, {
|
||||
silenceError: true,
|
||||
})
|
||||
).toContain(
|
||||
`No git tags matching pattern "v{version}" for project "${pkg1}" were found`
|
||||
);
|
||||
|
||||
// Create a matching tag on the current branch (this should not be found because we are going to create another tag on the other branch)
|
||||
await runCommandAsync(`git tag -a v1.1.1 -m "v1.1.1"`);
|
||||
|
||||
// Create a matching tag on a different branch, which it should find (because releaseTagPatternCheckAllBranchesWhen is true)
|
||||
await runCommandAsync(`git checkout -b other-branch`);
|
||||
// Update the README.md to create a new commit to tag
|
||||
await runCommandAsync(`echo "Hello" > README.md`);
|
||||
await runCommandAsync(`git add README.md`);
|
||||
await runCommandAsync(`git commit -m "chore: update README.md"`);
|
||||
await runCommandAsync(`git tag -a v2.2.2 -m "v2.2.2"`);
|
||||
|
||||
// Switch back to the original branch
|
||||
await runCommandAsync(`git checkout main`);
|
||||
|
||||
// Finds the matching tag on the other branch because it is more recent and all branches are checked immediately
|
||||
expect(runCLI(`release version -d`)).toContain(
|
||||
`Resolved the current version as 2.2.2 from git tag "v2.2.2"`
|
||||
);
|
||||
});
|
||||
|
||||
it('should only check the current branch when releaseTagPatternCheckAllBranchesWhen is false, never all branches', async () => {
|
||||
updateJson<NxJsonConfiguration>('nx.json', (nxJson) => {
|
||||
nxJson.release = {
|
||||
releaseTagPattern: 'v{version}',
|
||||
releaseTagPatternCheckAllBranchesWhen: false,
|
||||
version: {
|
||||
conventionalCommits: true,
|
||||
},
|
||||
};
|
||||
return nxJson;
|
||||
});
|
||||
|
||||
// No tags at all yet
|
||||
expect(
|
||||
runCLI(`release version -d`, {
|
||||
silenceError: true,
|
||||
})
|
||||
).toContain(
|
||||
`No git tags matching pattern "v{version}" for project "${pkg1}" were found`
|
||||
);
|
||||
|
||||
// Create a matching tag on the current branch which should be found
|
||||
await runCommandAsync(`git tag -a v1.1.1 -m "v1.1.1"`);
|
||||
|
||||
// Create a matching tag on a different branch, which it should NOT ever find
|
||||
await runCommandAsync(`git checkout -b other-branch`);
|
||||
// Update the README.md to create a new commit to tag
|
||||
await runCommandAsync(`echo "Hello" > README.md`);
|
||||
await runCommandAsync(`git add README.md`);
|
||||
await runCommandAsync(`git commit -m "chore: update README.md"`);
|
||||
await runCommandAsync(`git tag -a v2.2.2 -m "v2.2.2"`);
|
||||
|
||||
// Switch back to the original branch
|
||||
await runCommandAsync(`git checkout main`);
|
||||
|
||||
// Finds the tag on the current branch
|
||||
expect(runCLI(`release version -d`)).toContain(
|
||||
`Resolved the current version as 1.1.1 from git tag "v1.1.1"`
|
||||
);
|
||||
|
||||
// Delete the tag on the current branch, now it should find any matching tag because the other branch will not be checked
|
||||
await runCommandAsync(`git tag -d v1.1.1`);
|
||||
expect(
|
||||
runCLI(`release version -d`, {
|
||||
silenceError: true,
|
||||
})
|
||||
).toContain(
|
||||
`No git tags matching pattern "v{version}" for project "${pkg1}" were found`
|
||||
);
|
||||
});
|
||||
|
||||
it('should check all branches when the current branch matches one of the entries in the releaseTagPatternCheckAllBranchesWhen array', async () => {
|
||||
updateJson<NxJsonConfiguration>('nx.json', (nxJson) => {
|
||||
nxJson.release = {
|
||||
releaseTagPattern: 'v{version}',
|
||||
// This means => when we are on a branch called "main", we should check all branches, not just the current one
|
||||
releaseTagPatternCheckAllBranchesWhen: ['main'],
|
||||
version: {
|
||||
conventionalCommits: true,
|
||||
},
|
||||
};
|
||||
return nxJson;
|
||||
});
|
||||
|
||||
// No tags at all yet
|
||||
expect(
|
||||
runCLI(`release version -d`, {
|
||||
silenceError: true,
|
||||
})
|
||||
).toContain(
|
||||
`No git tags matching pattern "v{version}" for project "${pkg1}" were found`
|
||||
);
|
||||
|
||||
// Create a matching tag on the current branch (this should not be found because we are going to create another tag on the other branch)
|
||||
await runCommandAsync(`git tag -a v1.1.1 -m "v1.1.1"`);
|
||||
|
||||
// Create a matching tag on a different branch, which it should find (because releaseTagPatternCheckAllBranchesWhen is true)
|
||||
await runCommandAsync(`git checkout -b other-branch`);
|
||||
// Update the README.md to create a new commit to tag
|
||||
await runCommandAsync(`echo "Hello" > README.md`);
|
||||
await runCommandAsync(`git add README.md`);
|
||||
await runCommandAsync(`git commit -m "chore: update README.md"`);
|
||||
await runCommandAsync(`git tag -a v2.2.2 -m "v2.2.2"`);
|
||||
|
||||
// Switch back to the original branch
|
||||
await runCommandAsync(`git checkout main`);
|
||||
|
||||
// Finds the matching tag on the other branch because it is more recent and all branches are checked immediately
|
||||
expect(runCLI(`release version -d`)).toContain(
|
||||
`Resolved the current version as 2.2.2 from git tag "v2.2.2"`
|
||||
);
|
||||
|
||||
// Change the config to confirm its behavior changes accordingly
|
||||
updateJson<NxJsonConfiguration>('nx.json', (nxJson) => {
|
||||
nxJson.release = {
|
||||
releaseTagPattern: 'v{version}',
|
||||
// This means => when we are on a branch called "does-not-exist", we should check all branches, not just the current one (this will intentionally not match the current branch)
|
||||
releaseTagPatternCheckAllBranchesWhen: ['does-not-exist'],
|
||||
version: {
|
||||
conventionalCommits: true,
|
||||
},
|
||||
};
|
||||
return nxJson;
|
||||
});
|
||||
|
||||
// Finds the matching tag on the current branch, because the current branch "main" does not match any entries in the releaseTagPatternCheckAllBranchesWhen array
|
||||
expect(runCLI(`release version -d`)).toContain(
|
||||
`Resolved the current version as 1.1.1 from git tag "v1.1.1"`
|
||||
);
|
||||
|
||||
// Change the config to confirm it supports glob patterns
|
||||
updateJson<NxJsonConfiguration>('nx.json', (nxJson) => {
|
||||
nxJson.release = {
|
||||
releaseTagPattern: 'v{version}',
|
||||
// This means => when we are on a branch that matches the pattern "ma*", we should check all branches, not just the current one (this should match the current branch called "main")
|
||||
releaseTagPatternCheckAllBranchesWhen: ['ma*'],
|
||||
version: {
|
||||
conventionalCommits: true,
|
||||
},
|
||||
};
|
||||
return nxJson;
|
||||
});
|
||||
|
||||
// Finds the matching tag on the other branch because the current branch "main" matches the pattern "ma*", and we should therefore check all branches for a matching tag
|
||||
expect(runCLI(`release version -d`)).toContain(
|
||||
`Resolved the current version as 2.2.2 from git tag "v2.2.2"`
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
@ -308,7 +308,8 @@ To fix this you will either need to add a package.json file at that location, or
|
||||
releaseTagPattern,
|
||||
{
|
||||
projectName: project.name,
|
||||
}
|
||||
},
|
||||
options.releaseGroup.releaseTagPatternCheckAllBranchesWhen
|
||||
);
|
||||
if (!latestMatchingGitTag) {
|
||||
if (options.fallbackCurrentVersionResolver === 'disk') {
|
||||
|
||||
@ -173,7 +173,22 @@
|
||||
]
|
||||
},
|
||||
"releaseTagPattern": {
|
||||
"type": "string",
|
||||
"description": "Optionally override the git/release tag pattern to use for this group."
|
||||
},
|
||||
"releaseTagPatternCheckAllBranchesWhen": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"description": "By default, we will try and resolve the latest match for the releaseTagPattern from the current branch, falling back to all branches if no match is found on the current branch. Setting this to true will cause us to ALWAYS check all branches for the latest match. Setting it to false will cause us to ONLY check the current branch for the latest match. Setting it to an array of strings will cause us to check all branches WHEN the current branch is one of the strings in the array. Glob patterns are supported."
|
||||
},
|
||||
"versionPlans": {
|
||||
"oneOf": [
|
||||
@ -247,9 +262,24 @@
|
||||
]
|
||||
},
|
||||
"releaseTagPattern": {
|
||||
"type": "string",
|
||||
"description": "Optionally override the git/release tag pattern to use. This field is the source of truth for changelog generation and release tagging, as well as for conventional commits parsing. It supports interpolating the version as {version} and (if releasing independently or forcing project level version control system releases) the project name as {projectName} within the string. The default releaseTagPattern for fixed/unified releases is: \"v{version}\". The default releaseTagPattern for independent releases at the project level is: \"{projectName}@{version}\""
|
||||
},
|
||||
"releaseTagPatternCheckAllBranchesWhen": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"description": "By default, we will try and resolve the latest match for the releaseTagPattern from the current branch, falling back to all branches if no match is found on the current branch. Setting this to true will cause us to ALWAYS check all branches for the latest match. Setting it to false will cause us to ONLY check the current branch for the latest match. Setting it to an array of strings will cause us to check all branches WHEN the current branch is one of the strings in the array. Glob patterns are supported."
|
||||
}
|
||||
}
|
||||
},
|
||||
"sync": {
|
||||
"type": "object",
|
||||
|
||||
@ -335,8 +335,13 @@ export function createAPI(overrideReleaseConfig: NxReleaseConfiguration) {
|
||||
} else {
|
||||
let workspaceChangelogFromRef =
|
||||
args.from ||
|
||||
(await getLatestGitTagForPattern(nxReleaseConfig.releaseTagPattern))
|
||||
?.tag;
|
||||
(
|
||||
await getLatestGitTagForPattern(
|
||||
nxReleaseConfig.releaseTagPattern,
|
||||
{},
|
||||
nxReleaseConfig.releaseTagPatternCheckAllBranchesWhen
|
||||
)
|
||||
)?.tag;
|
||||
if (!workspaceChangelogFromRef) {
|
||||
if (useAutomaticFromRef) {
|
||||
workspaceChangelogFromRef = await getFirstGitCommit();
|
||||
@ -540,7 +545,8 @@ export function createAPI(overrideReleaseConfig: NxReleaseConfiguration) {
|
||||
{
|
||||
projectName: project.name,
|
||||
releaseGroupName: releaseGroup.name,
|
||||
}
|
||||
},
|
||||
releaseGroup.releaseTagPatternCheckAllBranchesWhen
|
||||
)
|
||||
)?.tag;
|
||||
|
||||
@ -689,8 +695,13 @@ export function createAPI(overrideReleaseConfig: NxReleaseConfiguration) {
|
||||
} else {
|
||||
let fromRef =
|
||||
args.from ||
|
||||
(await getLatestGitTagForPattern(releaseGroup.releaseTagPattern))
|
||||
?.tag;
|
||||
(
|
||||
await getLatestGitTagForPattern(
|
||||
releaseGroup.releaseTagPattern,
|
||||
{},
|
||||
releaseGroup.releaseTagPatternCheckAllBranchesWhen
|
||||
)
|
||||
)?.tag;
|
||||
if (!fromRef) {
|
||||
if (useAutomaticFromRef) {
|
||||
fromRef = await getFirstGitCommit();
|
||||
|
||||
@ -279,6 +279,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -290,6 +291,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -465,6 +467,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -476,6 +479,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -654,6 +658,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -665,6 +670,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -874,6 +880,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -885,6 +892,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -1078,6 +1086,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -1089,6 +1098,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -1290,6 +1300,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -1301,6 +1312,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -1503,6 +1515,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -1514,6 +1527,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -1696,6 +1710,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -1707,6 +1722,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -1888,6 +1904,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -1899,6 +1916,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -2080,6 +2098,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@custom/generator",
|
||||
@ -2097,6 +2116,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@custom/generator-alternative",
|
||||
@ -2108,6 +2128,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -2300,6 +2321,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -2311,6 +2333,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -2497,6 +2520,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -2523,6 +2547,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -2534,6 +2559,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -2718,6 +2744,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "independent",
|
||||
"releaseTagPattern": "{projectName}@{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -2729,6 +2756,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -2914,6 +2942,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -2927,6 +2956,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -3110,6 +3140,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -3121,6 +3152,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -3305,6 +3337,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -3316,6 +3349,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -3496,6 +3530,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -3507,6 +3542,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -3690,6 +3726,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -3701,6 +3738,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -3899,6 +3937,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -3910,6 +3949,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -4090,6 +4130,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "{projectName}__{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -4101,6 +4142,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "{projectName}__{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -4300,6 +4342,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -4314,6 +4357,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -4486,6 +4530,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -4497,6 +4542,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -4710,6 +4756,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -4721,6 +4768,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -4924,6 +4972,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -4935,6 +4984,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -5116,6 +5166,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -5127,6 +5178,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -5316,6 +5368,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -5327,6 +5380,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -5517,6 +5571,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -5528,6 +5583,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -5795,6 +5851,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -5806,6 +5863,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -6012,6 +6070,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -6023,6 +6082,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -6394,6 +6454,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -6405,6 +6466,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -6584,6 +6646,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -6595,6 +6658,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -6810,6 +6874,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -6821,6 +6886,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -7012,6 +7078,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -7023,6 +7090,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -7217,6 +7285,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -7228,6 +7297,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -7423,6 +7493,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -7434,6 +7505,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -7632,6 +7704,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -7643,6 +7716,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -7866,6 +7940,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -7881,6 +7956,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -7907,6 +7983,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -7918,6 +7995,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -8143,6 +8221,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "{projectName}-{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -8154,6 +8233,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -8376,6 +8456,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -8387,6 +8468,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -8590,6 +8672,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -8601,6 +8684,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -9024,6 +9108,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -9035,6 +9120,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -9395,6 +9481,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "independent",
|
||||
"releaseTagPattern": "{projectName}@{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -9411,6 +9498,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -9422,6 +9510,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "independent",
|
||||
"releaseTagPattern": "{projectName}@{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -9590,6 +9679,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "independent",
|
||||
"releaseTagPattern": "{projectName}@{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -9601,6 +9691,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "independent",
|
||||
"releaseTagPattern": "{projectName}@{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -9786,6 +9877,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -9800,6 +9892,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -9984,6 +10077,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -9998,6 +10092,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -10181,6 +10276,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": true,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -10195,6 +10291,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": true,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -10384,6 +10481,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -10395,6 +10493,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": true,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -10581,6 +10680,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": true,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -10596,6 +10696,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": true,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -10823,6 +10924,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -10836,6 +10938,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -11021,6 +11124,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -11038,6 +11142,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -11223,6 +11328,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -11240,6 +11346,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -11251,6 +11358,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -11430,6 +11538,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -11451,6 +11560,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -11462,6 +11572,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -11641,6 +11752,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -11656,6 +11768,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -11669,6 +11782,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -11852,6 +11966,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -11867,6 +11982,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
@ -11884,6 +12000,7 @@ describe('createNxReleaseConfig()', () => {
|
||||
},
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "v{version}",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
"generator": "@nx/js:release-version",
|
||||
|
||||
@ -306,6 +306,8 @@ export async function createNxReleaseConfig(
|
||||
(workspaceProjectsRelationship === 'independent'
|
||||
? defaultIndependentReleaseTagPattern
|
||||
: defaultFixedReleaseTagPattern),
|
||||
releaseTagPatternCheckAllBranchesWhen:
|
||||
userConfig.releaseTagPatternCheckAllBranchesWhen ?? undefined,
|
||||
conventionalCommits: DEFAULT_CONVENTIONAL_COMMITS_CONFIG,
|
||||
versionPlans: (userConfig.versionPlans ||
|
||||
false) as NxReleaseConfig['versionPlans'],
|
||||
@ -340,6 +342,8 @@ export async function createNxReleaseConfig(
|
||||
groupProjectsRelationship === 'independent'
|
||||
? defaultIndependentReleaseTagPattern
|
||||
: WORKSPACE_DEFAULTS.releaseTagPattern,
|
||||
releaseTagPatternCheckAllBranchesWhen:
|
||||
userConfig.releaseTagPatternCheckAllBranchesWhen ?? undefined,
|
||||
versionPlans: false,
|
||||
};
|
||||
|
||||
@ -567,6 +571,10 @@ export async function createNxReleaseConfig(
|
||||
(projectsRelationship === 'independent'
|
||||
? defaultIndependentReleaseTagPattern
|
||||
: userConfig.releaseTagPattern || defaultFixedReleaseTagPattern),
|
||||
releaseTagPatternCheckAllBranchesWhen:
|
||||
releaseGroup.releaseTagPatternCheckAllBranchesWhen ??
|
||||
userConfig.releaseTagPatternCheckAllBranchesWhen ??
|
||||
undefined,
|
||||
versionPlans: releaseGroup.versionPlans ?? rootVersionPlansConfig,
|
||||
};
|
||||
|
||||
@ -628,6 +636,8 @@ export async function createNxReleaseConfig(
|
||||
nxReleaseConfig: {
|
||||
projectsRelationship: WORKSPACE_DEFAULTS.projectsRelationship,
|
||||
releaseTagPattern: WORKSPACE_DEFAULTS.releaseTagPattern,
|
||||
releaseTagPatternCheckAllBranchesWhen:
|
||||
WORKSPACE_DEFAULTS.releaseTagPatternCheckAllBranchesWhen,
|
||||
git: rootGitConfig,
|
||||
version: rootVersionConfig,
|
||||
changelog: rootChangelogConfig,
|
||||
|
||||
@ -43,6 +43,7 @@ describe('filterReleaseGroups()', () => {
|
||||
preVersionCommand: '',
|
||||
},
|
||||
releaseTagPattern: '',
|
||||
releaseTagPatternCheckAllBranchesWhen: undefined,
|
||||
git: {
|
||||
commit: false,
|
||||
commitMessage: '',
|
||||
@ -108,6 +109,7 @@ describe('filterReleaseGroups()', () => {
|
||||
groupPreVersionCommand: '',
|
||||
},
|
||||
releaseTagPattern: '',
|
||||
releaseTagPatternCheckAllBranchesWhen: undefined,
|
||||
versionPlans: false,
|
||||
},
|
||||
};
|
||||
@ -137,6 +139,7 @@ describe('filterReleaseGroups()', () => {
|
||||
groupPreVersionCommand: '',
|
||||
},
|
||||
releaseTagPattern: '',
|
||||
releaseTagPatternCheckAllBranchesWhen: undefined,
|
||||
versionPlans: false,
|
||||
},
|
||||
bar: {
|
||||
@ -150,6 +153,7 @@ describe('filterReleaseGroups()', () => {
|
||||
groupPreVersionCommand: '',
|
||||
},
|
||||
releaseTagPattern: '',
|
||||
releaseTagPatternCheckAllBranchesWhen: undefined,
|
||||
versionPlans: false,
|
||||
},
|
||||
};
|
||||
@ -166,6 +170,7 @@ describe('filterReleaseGroups()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"resolvedVersionPlans": false,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
@ -183,6 +188,7 @@ describe('filterReleaseGroups()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"resolvedVersionPlans": false,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
@ -204,6 +210,7 @@ describe('filterReleaseGroups()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"resolvedVersionPlans": false,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
@ -223,6 +230,7 @@ describe('filterReleaseGroups()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"resolvedVersionPlans": false,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
@ -251,6 +259,7 @@ describe('filterReleaseGroups()', () => {
|
||||
groupPreVersionCommand: '',
|
||||
},
|
||||
releaseTagPattern: '',
|
||||
releaseTagPatternCheckAllBranchesWhen: undefined,
|
||||
versionPlans: false,
|
||||
},
|
||||
};
|
||||
@ -279,6 +288,7 @@ describe('filterReleaseGroups()', () => {
|
||||
groupPreVersionCommand: '',
|
||||
},
|
||||
releaseTagPattern: '',
|
||||
releaseTagPatternCheckAllBranchesWhen: undefined,
|
||||
versionPlans: false,
|
||||
},
|
||||
bar: {
|
||||
@ -292,6 +302,7 @@ describe('filterReleaseGroups()', () => {
|
||||
groupPreVersionCommand: '',
|
||||
},
|
||||
releaseTagPattern: '',
|
||||
releaseTagPatternCheckAllBranchesWhen: undefined,
|
||||
versionPlans: false,
|
||||
},
|
||||
};
|
||||
@ -321,6 +332,7 @@ describe('filterReleaseGroups()', () => {
|
||||
groupPreVersionCommand: '',
|
||||
},
|
||||
releaseTagPattern: '',
|
||||
releaseTagPatternCheckAllBranchesWhen: undefined,
|
||||
versionPlans: false,
|
||||
},
|
||||
bar: {
|
||||
@ -334,6 +346,7 @@ describe('filterReleaseGroups()', () => {
|
||||
groupPreVersionCommand: '',
|
||||
},
|
||||
releaseTagPattern: '',
|
||||
releaseTagPatternCheckAllBranchesWhen: undefined,
|
||||
versionPlans: false,
|
||||
},
|
||||
};
|
||||
@ -350,6 +363,7 @@ describe('filterReleaseGroups()', () => {
|
||||
],
|
||||
"projectsRelationship": "independent",
|
||||
"releaseTagPattern": "",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"resolvedVersionPlans": false,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
@ -371,6 +385,7 @@ describe('filterReleaseGroups()', () => {
|
||||
],
|
||||
"projectsRelationship": "independent",
|
||||
"releaseTagPattern": "",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"resolvedVersionPlans": false,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
@ -415,6 +430,7 @@ describe('filterReleaseGroups()', () => {
|
||||
groupPreVersionCommand: '',
|
||||
},
|
||||
releaseTagPattern: '',
|
||||
releaseTagPatternCheckAllBranchesWhen: undefined,
|
||||
versionPlans: false,
|
||||
},
|
||||
bar: {
|
||||
@ -428,6 +444,7 @@ describe('filterReleaseGroups()', () => {
|
||||
groupPreVersionCommand: '',
|
||||
},
|
||||
releaseTagPattern: '',
|
||||
releaseTagPatternCheckAllBranchesWhen: undefined,
|
||||
versionPlans: false,
|
||||
},
|
||||
};
|
||||
@ -444,6 +461,7 @@ describe('filterReleaseGroups()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"resolvedVersionPlans": false,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
@ -465,6 +483,7 @@ describe('filterReleaseGroups()', () => {
|
||||
],
|
||||
"projectsRelationship": "fixed",
|
||||
"releaseTagPattern": "",
|
||||
"releaseTagPatternCheckAllBranchesWhen": undefined,
|
||||
"resolvedVersionPlans": false,
|
||||
"version": {
|
||||
"conventionalCommits": false,
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
* https://github.com/unjs/changelogen
|
||||
*/
|
||||
import { relative } from 'node:path';
|
||||
import { minimatch } from 'minimatch';
|
||||
import { interpolate } from '../../../tasks-runner/utils';
|
||||
import { workspaceRoot } from '../../../utils/workspace-root';
|
||||
import { execCommand } from './exec-command';
|
||||
@ -45,15 +46,52 @@ const SEMVER_REGEX =
|
||||
|
||||
export async function getLatestGitTagForPattern(
|
||||
releaseTagPattern: string,
|
||||
additionalInterpolationData = {}
|
||||
additionalInterpolationData = {},
|
||||
checkAllBranchesWhen?: boolean | string[]
|
||||
): Promise<{ tag: string; extractedVersion: string } | null> {
|
||||
/**
|
||||
* By default, we will try and resolve the latest match for the releaseTagPattern from the current branch,
|
||||
* falling back to all branches if no match is found on the current branch.
|
||||
*
|
||||
* - If checkAllBranchesWhen is true it will cause us to ALWAYS check all branches for the latest match.
|
||||
* - If checkAllBranchesWhen is explicitly set to false it will cause us to ONLY check the current branch for the latest match.
|
||||
* - If checkAllBranchesWhen is an array of strings it will cause us to check all branches WHEN the current branch is one of the strings in the array.
|
||||
*/
|
||||
let alwaysCheckAllBranches = false;
|
||||
if (typeof checkAllBranchesWhen !== 'undefined') {
|
||||
if (typeof checkAllBranchesWhen === 'boolean') {
|
||||
alwaysCheckAllBranches = checkAllBranchesWhen;
|
||||
} else if (Array.isArray(checkAllBranchesWhen)) {
|
||||
/**
|
||||
* Get the current git branch and determine whether to check all branches based on the checkAllBranchesWhen parameter
|
||||
*/
|
||||
const currentBranch = await execCommand('git', [
|
||||
'rev-parse',
|
||||
'--abbrev-ref',
|
||||
'HEAD',
|
||||
]).then((r) => r.trim());
|
||||
// Check exact match first
|
||||
alwaysCheckAllBranches = checkAllBranchesWhen.includes(currentBranch);
|
||||
// Check if any glob pattern matches next
|
||||
if (!alwaysCheckAllBranches) {
|
||||
alwaysCheckAllBranches = checkAllBranchesWhen.some((pattern) => {
|
||||
const r = minimatch.makeRe(pattern, { dot: true });
|
||||
if (!r) {
|
||||
return false;
|
||||
}
|
||||
return r.test(currentBranch);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const defaultGitArgs = ['tag', '--sort', '-v:refname'];
|
||||
|
||||
try {
|
||||
let tags: string[];
|
||||
tags = await execCommand('git', [
|
||||
'tag',
|
||||
'--sort',
|
||||
'-v:refname',
|
||||
'--merged',
|
||||
...defaultGitArgs,
|
||||
...(alwaysCheckAllBranches ? [] : ['--merged']),
|
||||
]).then((r) =>
|
||||
r
|
||||
.trim()
|
||||
@ -61,10 +99,16 @@ export async function getLatestGitTagForPattern(
|
||||
.map((t) => t.trim())
|
||||
.filter(Boolean)
|
||||
);
|
||||
if (!tags.length) {
|
||||
|
||||
if (
|
||||
// Do not run this fallback if the user explicitly set checkAllBranchesWhen to false
|
||||
checkAllBranchesWhen !== false &&
|
||||
!tags.length &&
|
||||
// There is no point in running this fallback if we already checked against all branches
|
||||
!alwaysCheckAllBranches
|
||||
) {
|
||||
// try again, but include all tags on the repo instead of just --merged ones
|
||||
tags = await execCommand('git', ['tag', '--sort', '-v:refname']).then(
|
||||
(r) =>
|
||||
tags = await execCommand('git', defaultGitArgs).then((r) =>
|
||||
r
|
||||
.trim()
|
||||
.split('\n')
|
||||
|
||||
@ -18,6 +18,7 @@ describe('shared', () => {
|
||||
},
|
||||
changelog: false,
|
||||
releaseTagPattern: '{projectName}-{version}',
|
||||
releaseTagPatternCheckAllBranchesWhen: undefined,
|
||||
versionPlans: false,
|
||||
resolvedVersionPlans: false,
|
||||
},
|
||||
@ -33,6 +34,7 @@ describe('shared', () => {
|
||||
},
|
||||
changelog: false,
|
||||
releaseTagPattern: '{projectName}-{version}',
|
||||
releaseTagPatternCheckAllBranchesWhen: undefined,
|
||||
versionPlans: false,
|
||||
resolvedVersionPlans: false,
|
||||
},
|
||||
@ -88,6 +90,7 @@ describe('shared', () => {
|
||||
},
|
||||
changelog: false,
|
||||
releaseTagPattern: '{projectName}-{version}',
|
||||
releaseTagPatternCheckAllBranchesWhen: undefined,
|
||||
versionPlans: false,
|
||||
resolvedVersionPlans: false,
|
||||
},
|
||||
@ -103,6 +106,7 @@ describe('shared', () => {
|
||||
},
|
||||
changelog: false,
|
||||
releaseTagPattern: '{projectName}-{version}',
|
||||
releaseTagPatternCheckAllBranchesWhen: undefined,
|
||||
versionPlans: false,
|
||||
resolvedVersionPlans: false,
|
||||
},
|
||||
@ -176,6 +180,7 @@ describe('shared', () => {
|
||||
renderOptions: { authors: true },
|
||||
},
|
||||
releaseTagPattern: '{projectName}-{version}',
|
||||
releaseTagPatternCheckAllBranchesWhen: undefined,
|
||||
name: '__default__',
|
||||
versionPlans: false,
|
||||
resolvedVersionPlans: false,
|
||||
@ -266,6 +271,7 @@ describe('shared', () => {
|
||||
projects,
|
||||
projectsRelationship: 'fixed',
|
||||
releaseTagPattern: 'my-group-{version}',
|
||||
releaseTagPatternCheckAllBranchesWhen: undefined,
|
||||
changelog: undefined,
|
||||
version: undefined,
|
||||
versionPlans: false,
|
||||
|
||||
@ -250,6 +250,15 @@ export interface NxReleaseConfiguration {
|
||||
* Optionally override the git/release tag pattern to use for this group.
|
||||
*/
|
||||
releaseTagPattern?: string;
|
||||
/**
|
||||
* By default, we will try and resolve the latest match for the releaseTagPattern from the current branch,
|
||||
* falling back to all branches if no match is found on the current branch.
|
||||
*
|
||||
* - Setting this to true will cause us to ALWAYS check all branches for the latest match.
|
||||
* - Setting it to false will cause us to ONLY check the current branch for the latest match.
|
||||
* - Setting it to an array of strings will cause us to check all branches WHEN the current branch matches one of the strings in the array. Glob patterns are supported.
|
||||
*/
|
||||
releaseTagPatternCheckAllBranchesWhen?: boolean | string[];
|
||||
/**
|
||||
* Enables using version plans as a specifier source for versioning and
|
||||
* to determine changes for changelog generation.
|
||||
@ -317,6 +326,15 @@ export interface NxReleaseConfiguration {
|
||||
* The default releaseTagPattern for independent releases at the project level is: "{projectName}@{version}"
|
||||
*/
|
||||
releaseTagPattern?: string;
|
||||
/**
|
||||
* By default, we will try and resolve the latest match for the releaseTagPattern from the current branch,
|
||||
* falling back to all branches if no match is found on the current branch.
|
||||
*
|
||||
* - Setting this to true will cause us to ALWAYS check all branches for the latest match.
|
||||
* - Setting it to false will cause us to ONLY check the current branch for the latest match.
|
||||
* - Setting it to an array of strings will cause us to check all branches WHEN the current branch matches one of the strings in the array. Glob patterns are supported.
|
||||
*/
|
||||
releaseTagPatternCheckAllBranchesWhen?: boolean | string[];
|
||||
/**
|
||||
* Enable and configure automatic git operations as part of the release
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user