summaryrefslogtreecommitdiff
path: root/app/SlackBuilder/CommandLine.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/SlackBuilder/CommandLine.hs')
-rw-r--r--app/SlackBuilder/CommandLine.hs13
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")