diff options
| author | Eugen Wissner <belka@caraus.de> | 2023-08-15 10:33:19 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2023-08-15 10:33:19 +0200 |
| commit | 6b15ccd0f53c7ffd57820fb15664ecadee74392a (patch) | |
| tree | 20ba7c838a2be1e7bd0707ed098f505c43a4da79 /app/SlackBuilder/CommandLine.hs | |
| parent | 5a9e87cd5f65439ef8f2717b3b3e561f42f2e24c (diff) | |
| download | slackbuilder-6b15ccd0f53c7ffd57820fb15664ecadee74392a.tar.gz | |
Support repository path in commits
Diffstat (limited to 'app/SlackBuilder/CommandLine.hs')
| -rw-r--r-- | app/SlackBuilder/CommandLine.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/SlackBuilder/CommandLine.hs b/app/SlackBuilder/CommandLine.hs index 1313abb..6b915f2 100644 --- a/app/SlackBuilder/CommandLine.hs +++ b/app/SlackBuilder/CommandLine.hs @@ -23,6 +23,9 @@ data SlackBuilderCommand = PackagistCommand PackagistArguments | TextCommand TextArguments | GhCommand GhArguments + | SlackBuildCommand Text Text + | CommitCommand Text Text + deriving (Eq, Show) data PackagistArguments = PackagistArguments { vendor :: Text @@ -36,6 +39,7 @@ data GhArguments = GhArguments } deriving (Eq, Show) newtype TextArguments = TextArguments Text + deriving (Eq, Show) packagistArguments :: Parser PackagistArguments packagistArguments = PackagistArguments @@ -59,3 +63,12 @@ slackBuilderCommand = subparser $ command "packagist" (info (PackagistCommand <$> packagistArguments) mempty) <> command "text" (info (TextCommand <$> textArguments) mempty) <> command "github" (info (GhCommand <$> ghArguments) mempty) + <> command "slackbuild" (info slackBuildCommand mempty) + <> command "commit" (info commitCommand mempty) + where + slackBuildCommand = SlackBuildCommand + <$> argument str (metavar "PATH") + <*> argument str (metavar "VERSION") + commitCommand = CommitCommand + <$> argument str (metavar "PATH") + <*> argument str (metavar "VERSION") |
