mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
Stream stdout of verify_signatures (#8911)
There is really no reason to first capture this to a String and then putStrLn it. That only causes issues since if we crash with a non-zero exitcode we won’t output anything. changelog_begin changelog_end
This commit is contained in:
parent
2e671e4e5d
commit
c309ef915c
@ -344,9 +344,9 @@ download_assets tmp release = do
|
|||||||
IO.withBinaryFile (tmp </> (last $ Network.URI.pathSegments url)) IO.AppendMode $ \handle -> do
|
IO.withBinaryFile (tmp </> (last $ Network.URI.pathSegments url)) IO.AppendMode $ \handle -> do
|
||||||
while (readFrom body) (writeTo handle)
|
while (readFrom body) (writeTo handle)
|
||||||
|
|
||||||
verify_signatures :: FilePath -> FilePath -> String -> IO String
|
verify_signatures :: FilePath -> FilePath -> String -> IO ()
|
||||||
verify_signatures bash_lib tmp version_tag = do
|
verify_signatures bash_lib tmp version_tag = do
|
||||||
shell $ unlines ["bash -c '",
|
System.callCommand $ unlines ["bash -c '",
|
||||||
"set -euo pipefail",
|
"set -euo pipefail",
|
||||||
"eval \"$(dev-env/bin/dade assist)\"",
|
"eval \"$(dev-env/bin/dade assist)\"",
|
||||||
"source \"" <> bash_lib <> "\"",
|
"source \"" <> bash_lib <> "\"",
|
||||||
@ -420,7 +420,7 @@ check_releases gcp_credentials bash_lib max_releases = do
|
|||||||
putStrLn $ "Checking release " <> v <> " ..."
|
putStrLn $ "Checking release " <> v <> " ..."
|
||||||
IO.withTempDir $ \temp_dir -> do
|
IO.withTempDir $ \temp_dir -> do
|
||||||
download_assets temp_dir release
|
download_assets temp_dir release
|
||||||
verify_signatures bash_lib temp_dir v >>= putStrLn
|
verify_signatures bash_lib temp_dir v
|
||||||
Control.Monad.Extra.whenJust gcp_credentials $ \gcred ->
|
Control.Monad.Extra.whenJust gcp_credentials $ \gcred ->
|
||||||
Directory.listDirectory temp_dir >>= Data.Foldable.traverse_ (\f -> do
|
Directory.listDirectory temp_dir >>= Data.Foldable.traverse_ (\f -> do
|
||||||
let local_github = temp_dir </> f
|
let local_github = temp_dir </> f
|
||||||
|
Loading…
Reference in New Issue
Block a user