aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/github/jshipit/Commands.java
diff options
context:
space:
mode:
authoraxtloss <axtlos@getcryst.al>2023-05-25 23:16:38 +0200
committeraxtloss <axtlos@getcryst.al>2023-05-25 23:16:38 +0200
commit3fdb1012609b71a41e551ea0aad3b8a27b134e21 (patch)
tree93956331d1e3ca1ceb493fd0a0d8c1bcebdb6994 /src/main/java/io/github/jshipit/Commands.java
parentcd0df48723ca7c603cececc3c65003bf43b09d59 (diff)
downloadjshipit-3fdb1012609b71a41e551ea0aad3b8a27b134e21.tar.gz
jshipit-3fdb1012609b71a41e551ea0aad3b8a27b134e21.tar.bz2
remove command, allow registry/repo/image:tag layout
Diffstat (limited to 'src/main/java/io/github/jshipit/Commands.java')
-rw-r--r--src/main/java/io/github/jshipit/Commands.java34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/main/java/io/github/jshipit/Commands.java b/src/main/java/io/github/jshipit/Commands.java
index 89eaad4..ffdbe38 100644
--- a/src/main/java/io/github/jshipit/Commands.java
+++ b/src/main/java/io/github/jshipit/Commands.java
@@ -7,6 +7,9 @@ import com.beust.jcommander.Parameters;
class CommandShell {
@Parameter(names = {"--name", "-n"}, description = "Name of the container", required = true)
public String containerName;
+
+ @Parameter(names = "--help", help = true)
+ private boolean help;
}
@Parameters(commandDescription = "Start a container")
@@ -16,6 +19,9 @@ class CommandStart {
@Parameter(names = {"--command", "-c"}, description = "Command to run in the container", required = false)
public String containerCommand = null;
+
+ @Parameter(names = "--help", help = true)
+ private boolean help;
}
@Parameters(commandDescription = "Create a container")
@@ -26,15 +32,8 @@ class CommandCreate {
@Parameter(names = {"--image", "-i"}, description = "Image of the container")
public String containerImage;
- @Parameter(names = {"--tag", "-t"}, description = "Tag of the container")
- public String containerTag;
-
- @Parameter(names = {"--api-repo", "-a"}, description = "API repository of the container")
- public String containerApiRepo;
-
- @Parameter(names = {"--repo", "-r"}, description = "Repository of the container")
- public String containerRepo;
-
+ @Parameter(names = "--help", help = true)
+ private boolean help;
}
@Parameters(commandDescription = "Pull a container image")
@@ -42,13 +41,16 @@ class CommandPull {
@Parameter(names = {"--image", "-i"}, description = "Image of the container")
public String containerImage;
- @Parameter(names = {"--tag", "-t"}, description = "Tag of the container")
- public String containerTag;
+ @Parameter(names = "--help", help = true)
+ private boolean help;
- @Parameter(names = {"--api-repo", "-a"}, description = "API repository of the container")
- public String containerApiRepo;
+}
- @Parameter(names = {"--repo", "-r"}, description = "Repository of the container")
- public String containerRepo;
+@Parameters(commandDescription = "Delete a container")
+class CommandDelete {
+ @Parameter(names = {"--name", "-n"}, description = "Name of the container")
+ public String containerName;
-}
+ @Parameter(names = "--help", help = true)
+ private boolean help;
+} \ No newline at end of file