diff options
Diffstat (limited to 'src/main/java/io/github/jshipit/Commands.java')
-rw-r--r-- | src/main/java/io/github/jshipit/Commands.java | 34 |
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 |