Merge pull request #440 from wasp-lang/martijn-no-env-in-build

When we build, do not copy .env. Fixes #413
This commit is contained in:
Martijn Faassen 2022-01-31 14:40:28 +01:00 committed by GitHub
commit f8ddebfb0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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|]