refactor: Add dry-run option to base class

This commit is contained in:
Andres Almiray 2025-01-21 19:27:07 +01:00
parent 082fd7d277
commit b5e068a90a
No known key found for this signature in database
GPG key ID: CCC55C5167419ADB
3 changed files with 10 additions and 20 deletions

View file

@ -24,6 +24,16 @@ public class AbstractJReleaserPlatformAwareModelOperation<S extends AbstractJRel
super(command);
}
/**
* Enables dry-run mode.
*
* @return this operation instance
*/
public S dryRun() {
setOption("--dry-run", EMPTY);
return self();
}
/**
* Limits artifact selection to the current platform.
*

View file

@ -23,14 +23,4 @@ public class JReleaserPackageOperation extends AbstractJReleaserPackagerModelOpe
public JReleaserPackageOperation() {
super("package");
}
/**
* Enables dry-run mode.
*
* @return this operation instance
*/
public JReleaserPackageOperation dryRun() {
setOption("--dry-run", EMPTY);
return this;
}
}

View file

@ -23,14 +23,4 @@ public class JReleaserPublishOperation extends AbstractJReleaserPackagerModelOpe
public JReleaserPublishOperation() {
super("publish");
}
/**
* Enables dry-run mode.
*
* @return this operation instance
*/
public JReleaserPublishOperation dryRun() {
setOption("--dry-run", EMPTY);
return this;
}
}