X Tutup
Skip to content

Commit d83ff1a

Browse files
committed
adding check to run() to make sure pack and apply-git-tags-on-pack are used together
1 parent 76a25ed commit d83ff1a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

apps/rush-lib/src/cli/actions/PublishAction.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ export class PublishAction extends BaseRushAction {
233233
if (this._registryUrl.value && this._pack.value) {
234234
throw new Error(`--registry cannot be used with --pack`);
235235
}
236+
if (this._applyGitTagsOnPack.value && !this._pack.value) {
237+
throw new Error(`${this._applyGitTagsOnPack.longName} must be used `
238+
+ `with ${this._pack.longName}`);
239+
}
236240
}
237241

238242
private _publishChanges(allPackages: Map<string, RushConfigurationProject>): void {

apps/rush-lib/src/cli/test/__snapshots__/CommandLineHelp.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,8 @@ Optional arguments:
415415
will be published with --force on npm
416416
--apply-git-tags-on-pack
417417
If specified with --publish and --pack, git tags will
418-
be applied for packages on pack as if a publish was
419-
being run without --pack.
418+
be applied for packages as if a publish was being run
419+
without --pack.
420420
"
421421
`;
422422

0 commit comments

Comments
 (0)
X Tutup