language: added an output file option to the new build command. (#511)

This adds an output file option to `daml build` to specify where to
write the created dar.
This commit is contained in:
Robin Krom 2019-04-15 23:58:20 +02:00 committed by GitHub
parent bdb5160403
commit c049df1261
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,7 +135,7 @@ cmdBuild numProcessors =
info (helper <*> cmd) $
progDesc "Initialize, build and package the DAML project" <> fullDesc
where
cmd = pure $ execBuild numProcessors
cmd = execBuild numProcessors <$> optionalOutputFileOpt
cmdPackageNew :: Int -> Mod CommandFields Command
cmdPackageNew numProcessors =
@ -394,10 +394,10 @@ createProjectPackageDb lfVersion fps = do
, "--expand-pkgroot"
]
execBuild :: Int -> IO ()
execBuild numProcessors = do
execBuild :: Int -> Maybe FilePath -> IO ()
execBuild numProcessors mbOutFile = do
execInit
execPackageNew numProcessors Nothing
execPackageNew numProcessors mbOutFile
lfVersionString :: LF.Version -> String
lfVersionString lfVersion =