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.hs58
1 files changed, 0 insertions, 58 deletions
diff --git a/app/SlackBuilder/CommandLine.hs b/app/SlackBuilder/CommandLine.hs
deleted file mode 100644
index 7cfe747..0000000
--- a/app/SlackBuilder/CommandLine.hs
+++ /dev/null
@@ -1,58 +0,0 @@
-module SlackBuilder.CommandLine
- ( GhArguments(..)
- , SlackBuilderCommand(..)
- , PackagistArguments(..)
- , TextArguments(..)
- , slackBuilderParser
- ) where
-
-import Data.Text (Text)
-import Options.Applicative
- ( Parser
- , ParserInfo(..)
- , metavar
- , argument
- , str
- , info
- , fullDesc
- , subparser
- , command,
- )
-
-data SlackBuilderCommand
- = CategoryCommand Text
- | CloneCommand Text Text Text
- | Up2DateCommand
-
-data PackagistArguments = PackagistArguments
- { vendor :: Text
- , name :: Text
- } deriving (Eq, Show)
-
-data GhArguments = GhArguments
- { owner :: Text
- , name :: Text
- , transform :: Maybe Text
- } deriving (Eq, Show)
-
-data TextArguments = TextArguments
- { versionPicker :: Text -> Text
- , textURL :: Text
- }
-
-slackBuilderParser :: ParserInfo SlackBuilderCommand
-slackBuilderParser = info slackBuilderCommand fullDesc
-
-slackBuilderCommand :: Parser SlackBuilderCommand
-slackBuilderCommand = subparser
- $ command "category" (info categoryCommand mempty)
- <> command "clone" (info cloneCommand mempty)
- <> command "up2date" (info up2DateCommand mempty)
- where
- categoryCommand = CategoryCommand
- <$> argument str (metavar "PKGNAM")
- cloneCommand = CloneCommand
- <$> argument str (metavar "REPO")
- <*> argument str (metavar "TARBALL")
- <*> argument str (metavar "TAG_PREFIX")
- up2DateCommand = pure Up2DateCommand