summaryrefslogtreecommitdiff
path: root/src/Command.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2025-11-09 22:42:35 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2025-11-12 21:20:53 +0100
commite96ecb1ce8f81b3a256f6982c5da1aa7cbeb4e59 (patch)
tree781d602220c142e9966736061ee82fbfa7ca1598 /src/Command.hs
parent652d3e82208da8a0b1bd052c7284b5904e59d20a (diff)
Publish artifacts to destinationsHEADmaster
Changelog: Job section to publish artifacts to specified destination
Diffstat (limited to 'src/Command.hs')
-rw-r--r--src/Command.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Command.hs b/src/Command.hs
index 30b0df0..1ef52ed 100644
--- a/src/Command.hs
+++ b/src/Command.hs
@@ -30,6 +30,7 @@ import System.Exit
import System.IO
import Config
+import Destination
import Eval
import Output
import Repo
@@ -37,12 +38,14 @@ import Repo
data CommonOptions = CommonOptions
{ optJobs :: Int
, optRepo :: [ ( RepoName, FilePath ) ]
+ , optDestination :: [ ( DestinationName, Text ) ]
}
defaultCommonOptions :: CommonOptions
defaultCommonOptions = CommonOptions
{ optJobs = 2
, optRepo = []
+ , optDestination = []
}
class CommandArgumentsType (CommandArguments c) => Command c where
@@ -102,6 +105,7 @@ data CommandInput = CommandInput
, ciJobRoot :: JobRoot
, ciContainingRepo :: Maybe Repo
, ciOtherRepos :: [ ( RepoName, Repo ) ]
+ , ciDestinations :: [ ( DestinationName, Destination ) ]
, ciOutput :: Output
, ciStorageDir :: FilePath
}
@@ -137,6 +141,7 @@ getEvalInput = CommandExec $ do
eiCurrentIdRev <- return []
eiContainingRepo <- asks ciContainingRepo
eiOtherRepos <- asks ciOtherRepos
+ eiDestinations <- asks ciDestinations
return EvalInput {..}
cmdEvalWith :: (EvalInput -> EvalInput) -> Eval a -> CommandExec a