You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2019/04/23 11:48:40 UTC
[sling-org-apache-sling-committer-cli] 35/36: SLING-8337 - Create
sub-command to manage the Jira update when promoting a release
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch feature/SLING-8337
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-committer-cli.git
commit ea8878d583848b70495a3666af15d38cda4a62cf
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Tue Apr 23 14:14:10 2019 +0300
SLING-8337 - Create sub-command to manage the Jira update when promoting a release
Rename UpdateJiraCommand to better reflect its purpose.
---
...pdateJiraCommand.java => CreateJiraVersionCommand.java} | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/main/java/org/apache/sling/cli/impl/release/UpdateJiraCommand.java b/src/main/java/org/apache/sling/cli/impl/release/CreateJiraVersionCommand.java
similarity index 81%
rename from src/main/java/org/apache/sling/cli/impl/release/UpdateJiraCommand.java
rename to src/main/java/org/apache/sling/cli/impl/release/CreateJiraVersionCommand.java
index a636ee8..e7b1708 100644
--- a/src/main/java/org/apache/sling/cli/impl/release/UpdateJiraCommand.java
+++ b/src/main/java/org/apache/sling/cli/impl/release/CreateJiraVersionCommand.java
@@ -30,16 +30,16 @@ import org.slf4j.LoggerFactory;
@Component(service = Command.class, property = {
Command.PROPERTY_NAME_COMMAND+"=release",
- Command.PROPERTY_NAME_SUBCOMMAND+"=update-jira",
- Command.PROPERTY_NAME_SUMMARY+"=Releases the current version, closes versions fixed in the current version and creates a new version if needed"
+ Command.PROPERTY_NAME_SUBCOMMAND+"=create-jira-new-version",
+ Command.PROPERTY_NAME_SUMMARY+"=Creates a new Jira version, if needed, and transitions any unresolved issues from the version being released to the next one."
})
-public class UpdateJiraCommand implements Command {
+public class CreateJiraVersionCommand implements Command {
@Reference
private StagingRepositoryFinder repoFinder;
@Reference
- private VersionClient versionFinder;
+ private VersionClient versionClient;
private final Logger logger = LoggerFactory.getLogger(getClass());
@@ -48,14 +48,14 @@ public class UpdateJiraCommand implements Command {
try {
StagingRepository repo = repoFinder.find(Integer.parseInt(target));
for (Release release : Release.fromString(repo.getDescription()) ) {
- Version version = versionFinder.find(release);
+ Version version = versionClient.find(release);
logger.info("Found version {}", version);
- Version successorVersion = versionFinder.findSuccessorVersion(release);
+ Version successorVersion = versionClient.findSuccessorVersion(release);
logger.info("Found successor version {}", successorVersion);
if ( successorVersion == null ) {
Release next = release.next();
logger.info("Would create version {}", next.getName());
- versionFinder.create(next.getName());
+ versionClient.create(next.getName());
logger.info("Created version {}", next.getName());
}