When we build, do not generate .env

This commit is contained in:
Martijn Faassen 2022-01-31 12:17:03 +01:00
parent 0abefb460b
commit cb33f2d545

View File

@ -83,12 +83,13 @@ preCleanup _ outDir = do
genDotEnv :: AppSpec -> Generator [FileDraft]
genDotEnv spec = return $
case AS.dotEnvFile spec of
Just srcFilePath ->
[ createCopyFileDraft
(C.serverRootDirInProjectRootDir </> dotEnvInServerRootDir)
srcFilePath
]
Nothing -> []
Just srcFilePath
| not $ AS.isBuild spec ->
[ createCopyFileDraft
(C.serverRootDirInProjectRootDir </> dotEnvInServerRootDir)
srcFilePath
]
_ -> []
dotEnvInServerRootDir :: Path' (Rel C.ServerRootDir) File'
dotEnvInServerRootDir = [relfile|.env|]