Support a custom upload command
All checks were successful
Build / audit (push) Successful in 13m47s
Build / test (push) Successful in 14m16s

This commit is contained in:
2024-05-11 19:01:41 +02:00
parent 6ba319c3b6
commit f8ef93fde7
4 changed files with 27 additions and 24 deletions

View File

@@ -9,6 +9,7 @@ module SlackBuilder.Config
, settingsCodec
) where
import Data.List.NonEmpty (NonEmpty(..))
import Data.Text (Text)
import Toml ((.=))
import qualified Toml
@@ -18,7 +19,7 @@ data Settings = Settings
, repository :: !FilePath
, branch :: Text
, downloadURL :: Text
, remotePath :: Text
, uploadCommand :: NonEmpty Text
, maintainer :: MaintainerSettings
} deriving (Eq, Show)
@@ -32,7 +33,7 @@ settingsCodec = Settings
<*> Toml.string "repository" .= repository
<*> Toml.text "branch" .= branch
<*> Toml.text "download_url" .= downloadURL
<*> Toml.text "remote_path" .= remotePath
<*> Toml.arrayNonEmptyOf Toml._Text "upload_command" .= uploadCommand
<*> Toml.table maintainerSettingsCodec "maintainer" .= maintainer
maintainerSettingsCodec :: Toml.TomlCodec MaintainerSettings