-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #484 from psmf22/tool_debricked
feat: tool debricked commands
- Loading branch information
Showing
21 changed files
with
362 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...fcli-tool/src/main/java/com/fortify/cli/tool/debricked/cli/cmd/ToolDebrickedCommands.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/******************************************************************************* | ||
* Copyright 2021, 2022 Open Text. | ||
* | ||
* The only warranties for products and services of Open Text | ||
* and its affiliates and licensors ("Open Text") are as may | ||
* be set forth in the express warranty statements accompanying | ||
* such products and services. Nothing herein should be construed | ||
* as constituting an additional warranty. Open Text shall not be | ||
* liable for technical or editorial errors or omissions contained | ||
* herein. The information contained herein is subject to change | ||
* without notice. | ||
*******************************************************************************/ | ||
package com.fortify.cli.tool.debricked.cli.cmd; | ||
|
||
import com.fortify.cli.common.cli.cmd.AbstractContainerCommand; | ||
|
||
import picocli.CommandLine.Command; | ||
|
||
@Command( | ||
name = ToolDebrickedCommands.TOOL_NAME, | ||
subcommands = { | ||
ToolDebrickedInstallCommand.class, | ||
ToolDebrickedListCommand.class, | ||
ToolDebrickedUninstallCommand.class | ||
} | ||
|
||
) | ||
public class ToolDebrickedCommands extends AbstractContainerCommand { | ||
static final String TOOL_NAME = "debricked"; | ||
} |
50 changes: 50 additions & 0 deletions
50
...ool/src/main/java/com/fortify/cli/tool/debricked/cli/cmd/ToolDebrickedInstallCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/******************************************************************************* | ||
* Copyright 2021, 2023 Open Text. | ||
* | ||
* The only warranties for products and services of Open Text | ||
* and its affiliates and licensors ("Open Text") are as may | ||
* be set forth in the express warranty statements accompanying | ||
* such products and services. Nothing herein should be construed | ||
* as constituting an additional warranty. Open Text shall not be | ||
* liable for technical or editorial errors or omissions contained | ||
* herein. The information contained herein is subject to change | ||
* without notice. | ||
*******************************************************************************/ | ||
package com.fortify.cli.tool.debricked.cli.cmd; | ||
|
||
import java.io.IOException; | ||
import java.nio.file.Files; | ||
import java.nio.file.Path; | ||
|
||
import com.fortify.cli.common.output.cli.mixin.OutputHelperMixins; | ||
import com.fortify.cli.tool._common.cli.cmd.AbstractToolInstallCommand; | ||
import com.fortify.cli.tool._common.helper.ToolVersionInstallDescriptor; | ||
|
||
import lombok.Getter; | ||
import picocli.CommandLine.Command; | ||
import picocli.CommandLine.Mixin; | ||
import picocli.CommandLine.Option; | ||
|
||
@Command(name = OutputHelperMixins.Install.CMD_NAME) | ||
public class ToolDebrickedInstallCommand extends AbstractToolInstallCommand { | ||
@Getter @Mixin private OutputHelperMixins.Install outputHelper; | ||
@Getter private String toolName = ToolDebrickedCommands.TOOL_NAME; | ||
@Getter @Option(names={"-a", "--cpuArchitecture"}, required = true, descriptionKey="fcli.tool.debricked.install.cpuArchitecture", defaultValue = "x86_64") | ||
private String _cpuArchitecture; | ||
|
||
@Override | ||
protected InstallType getInstallType() { | ||
return InstallType.EXTRACT_TGZ; | ||
} | ||
|
||
@Override | ||
protected void postInstall(ToolVersionInstallDescriptor descriptor) throws IOException { | ||
Path binPath = descriptor.getBinPath(); | ||
Files.createDirectories(binPath); | ||
} | ||
|
||
@Override | ||
protected String getCpuArchitecture() { | ||
return _cpuArchitecture; | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...i-tool/src/main/java/com/fortify/cli/tool/debricked/cli/cmd/ToolDebrickedListCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/******************************************************************************* | ||
* Copyright 2021, 2023 Open Text. | ||
* | ||
* The only warranties for products and services of Open Text | ||
* and its affiliates and licensors ("Open Text") are as may | ||
* be set forth in the express warranty statements accompanying | ||
* such products and services. Nothing herein should be construed | ||
* as constituting an additional warranty. Open Text shall not be | ||
* liable for technical or editorial errors or omissions contained | ||
* herein. The information contained herein is subject to change | ||
* without notice. | ||
*******************************************************************************/ | ||
package com.fortify.cli.tool.debricked.cli.cmd; | ||
|
||
import com.fortify.cli.common.output.cli.mixin.OutputHelperMixins; | ||
import com.fortify.cli.tool._common.cli.cmd.AbstractToolListCommand; | ||
|
||
import lombok.Getter; | ||
import picocli.CommandLine.Command; | ||
import picocli.CommandLine.Mixin; | ||
|
||
@Command(name = OutputHelperMixins.List.CMD_NAME) | ||
public class ToolDebrickedListCommand extends AbstractToolListCommand { | ||
@Getter @Mixin private OutputHelperMixins.List outputHelper; | ||
@Getter private String toolName = ToolDebrickedCommands.TOOL_NAME; | ||
} |
34 changes: 34 additions & 0 deletions
34
...l/src/main/java/com/fortify/cli/tool/debricked/cli/cmd/ToolDebrickedUninstallCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/******************************************************************************* | ||
* Copyright 2021, 2023 Open Text. | ||
* | ||
* The only warranties for products and services of Open Text | ||
* and its affiliates and licensors ("Open Text") are as may | ||
* be set forth in the express warranty statements accompanying | ||
* such products and services. Nothing herein should be construed | ||
* as constituting an additional warranty. Open Text shall not be | ||
* liable for technical or editorial errors or omissions contained | ||
* herein. The information contained herein is subject to change | ||
* without notice. | ||
*******************************************************************************/ | ||
package com.fortify.cli.tool.debricked.cli.cmd; | ||
|
||
import com.fortify.cli.common.output.cli.mixin.OutputHelperMixins; | ||
import com.fortify.cli.tool._common.cli.cmd.AbstractToolUninstallCommand; | ||
|
||
import lombok.Getter; | ||
import picocli.CommandLine.Command; | ||
import picocli.CommandLine.Mixin; | ||
import picocli.CommandLine.Option; | ||
|
||
@Command(name = OutputHelperMixins.Uninstall.CMD_NAME) | ||
public class ToolDebrickedUninstallCommand extends AbstractToolUninstallCommand { | ||
@Getter @Mixin private OutputHelperMixins.Uninstall outputHelper; | ||
@Getter private String toolName = ToolDebrickedCommands.TOOL_NAME; | ||
@Getter @Option(names={"-a", "--cpuArchitecture"}, required = true, descriptionKey="fcli.tool.debricked.uninstall.cpuArchitecture", defaultValue = "x86_64") | ||
private String _cpuArchitecture; | ||
|
||
@Override | ||
protected String getCpuArchitecture() { | ||
return _cpuArchitecture; | ||
} | ||
} |
Oops, something went wrong.