Support a custom upload command
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user