1
0
Fork 0

Fix further shadowings

This commit is contained in:
Malte Brandy 2020-05-16 18:08:50 +02:00
parent c481116df0
commit 11e8640ac9
No known key found for this signature in database
GPG key ID: 226A2D41EF5378C9

View file

@ -33,10 +33,10 @@ let
(maybe [] (\x -> ["-f","default.nix",x]) -> target) <- lookupEnv "GL_OPTION_WEB_DEPLOY_NIX_TARGET"
(decodeUtf8 -> path) <- pwd |> captureTrim
say [i|Deploying build to /var/www/#{deploy}|]
bracket (checkout path) (rm "-rf") $ \dir -> withCurrentDirectory dir $ nix_build "-o" ([i|/var/www/#{deploy}|] :: String) target
bracket (checkout path) (rm "-rf") $ \repoDir -> withCurrentDirectory repoDir $ nix_build "-o" ([i|/var/www/#{deploy}|] :: String) target
say "Done"
test <- lookupEnv "GL_OPTION_TEST"
whenJust test $ \_ -> do
testFlag <- lookupEnv "GL_OPTION_TEST"
whenJust testFlag $ \_ -> do
say "Triggering (an async) system update."
exe "sudo" ${haskellList update-command};
'';