fix(release): ensure given preid modifies conventional commits specifier (#26524)
This commit is contained in:
parent
5d56e21163
commit
2ba4cf23f6
@ -165,7 +165,7 @@ Show help
|
|||||||
|
|
||||||
Type: `string`
|
Type: `string`
|
||||||
|
|
||||||
The optional prerelease identifier to apply to the version, in the case that the specifier argument has been set to `prerelease`.
|
The optional prerelease identifier to apply to the version. This will only be applied in the case that the specifier argument has been set to `prerelease` OR when conventional commits are enabled, in which case it will modify the resolved specifier from conventional commits to be its prerelease equivalent. E.g. minor -> preminor
|
||||||
|
|
||||||
##### specifier
|
##### specifier
|
||||||
|
|
||||||
|
|||||||
@ -165,7 +165,7 @@ Show help
|
|||||||
|
|
||||||
Type: `string`
|
Type: `string`
|
||||||
|
|
||||||
The optional prerelease identifier to apply to the version, in the case that the specifier argument has been set to `prerelease`.
|
The optional prerelease identifier to apply to the version. This will only be applied in the case that the specifier argument has been set to `prerelease` OR when conventional commits are enabled, in which case it will modify the resolved specifier from conventional commits to be its prerelease equivalent. E.g. minor -> preminor
|
||||||
|
|
||||||
##### specifier
|
##### specifier
|
||||||
|
|
||||||
|
|||||||
@ -406,8 +406,13 @@ To fix this you will either need to add a package.json file at that location, or
|
|||||||
`📄 Resolved the specifier as "${specifier}" since the current version is a prerelease.`
|
`📄 Resolved the specifier as "${specifier}" since the current version is a prerelease.`
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
let extraText = '';
|
||||||
|
if (options.preid && !specifier.startsWith('pre')) {
|
||||||
|
specifier = `pre${specifier}`;
|
||||||
|
extraText = `, combined with your given preid "${options.preid}"`;
|
||||||
|
}
|
||||||
log(
|
log(
|
||||||
`📄 Resolved the specifier as "${specifier}" using git history and the conventional commits standard.`
|
`📄 Resolved the specifier as "${specifier}" using git history and the conventional commits standard${extraText}.`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -203,7 +203,7 @@ const versionCommand: CommandModule<NxReleaseArgs, VersionOptions> = {
|
|||||||
.option('preid', {
|
.option('preid', {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
describe:
|
describe:
|
||||||
'The optional prerelease identifier to apply to the version, in the case that the specifier argument has been set to `prerelease`.',
|
'The optional prerelease identifier to apply to the version. This will only be applied in the case that the specifier argument has been set to `prerelease` OR when conventional commits are enabled, in which case it will modify the resolved specifier from conventional commits to be its prerelease equivalent. E.g. minor -> preminor',
|
||||||
default: '',
|
default: '',
|
||||||
})
|
})
|
||||||
.option('stage-changes', {
|
.option('stage-changes', {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user