summaryrefslogtreecommitdiff
path: root/app/SlackBuilder/CommandLine.hs
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2023-10-20 15:53:48 +0200
committerEugen Wissner <belka@caraus.de>2023-10-20 15:53:48 +0200
commit3a6d17952b247682f1cb794ef27b26c9b007f00d (patch)
treedfbfd7fe8ad4bba5084b6d5de7c9f97b010d5c51 /app/SlackBuilder/CommandLine.hs
parent4105ffa91f85d66e631383211b5d074b04fc0d3c (diff)
downloadslackbuilder-3a6d17952b247682f1cb794ef27b26c9b007f00d.tar.gz
Allow looking on the text page for the latest version
Diffstat (limited to 'app/SlackBuilder/CommandLine.hs')
-rw-r--r--app/SlackBuilder/CommandLine.hs11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/SlackBuilder/CommandLine.hs b/app/SlackBuilder/CommandLine.hs
index 1375b6e..53a6bfb 100644
--- a/app/SlackBuilder/CommandLine.hs
+++ b/app/SlackBuilder/CommandLine.hs
@@ -7,6 +7,7 @@ module SlackBuilder.CommandLine
) where
import Data.Text (Text)
+import qualified Data.Text as Text
import Options.Applicative
( Parser
, ParserInfo(..)
@@ -29,7 +30,6 @@ data SlackBuilderCommand
| CloneCommand Text Text Text
| DownloadAndDeployCommand Text Text
| Up2DateCommand
- deriving (Eq, Show)
data PackagistArguments = PackagistArguments
{ vendor :: Text
@@ -42,11 +42,14 @@ data GhArguments = GhArguments
, transform :: Maybe Text
} deriving (Eq, Show)
-newtype TextArguments = TextArguments Text
- deriving (Eq, Show)
+data TextArguments = TextArguments
+ { versionPicker :: Text -> Text
+ , textURL :: Text
+ }
textArguments :: Parser TextArguments
-textArguments = TextArguments <$> argument str (metavar "URL")
+textArguments = TextArguments Text.strip
+ <$> argument str (metavar "URL")
slackBuilderParser :: ParserInfo SlackBuilderCommand
slackBuilderParser = info slackBuilderCommand fullDesc