@@ -47,7 +47,7 @@ suite = tests $
4747 ] $ do
4848
4949 scope " lamdera check should succeed, ignoring the Debug.log usages" $ do
50- actual <- catchOutput $ checkWithParams project " always-v0"
50+ actual <- catchOutput $ checkWithParamsProduction project " always-v0"
5151 expectTextContains actual
5252 " It appears you're all set to deploy the first version of 'always-v0'!"
5353
@@ -64,7 +64,7 @@ suite = tests $
6464 io $ Ext.Common. bash $ " cd " <> project <> " && git init"
6565 io $ Ext.Common. bash $ " cd " <> project <> " && git remote add lamdera git@apps.lamdera.com:always-v0.git"
6666
67- _ <- io $ checkWithParams project " always-v0"
67+ _ <- io $ checkWithParamsProduction project " always-v0"
6868
6969 " elm-stuff/lamdera/.lamdera-fe-config" & expectContains " frontendOnly"
7070 " elm-stuff/lamdera/.lamdera-be-config" & expectContains " backendOnly"
@@ -115,15 +115,15 @@ expectFileContains needle file =
115115check = do
116116 -- touch "/Users/mario/lamdera/test/v1/src/WireTypes.elm"
117117 -- touch "/Users/mario/lamdera/test/v1/src/Env.elm"
118- -- checkWithParams "/Users/mario/lamdera/test/v1" "always-v0"
119- -- checkWithParams "/Users/mario/dev/test/ascii-art" "ascii-art-local"
120- -- checkWithParams "/Users/mario/dev/test/lamdera-minilatex-app" "minilatex"
121- -- checkWithParams "/Users/mario/dev/lamdera-user-projects/beat-the-big-two" "beat-the-big-two"
122- -- checkWithParams "/Users/mario/dev/projects/lamdera-dashboard" "dashboard"
123- -- checkWithParams "/Users/mario/dev/projects/lamdera-test" "testapp"
124- -- checkWithParams "/Users/mario/lamdera/tmp/elm-audio-test0" "elm-audio-test0"
125- -- checkWithParams "/Users/mario/lamdera-builds/build-test-local/staging" "test-local"
126- checkWithParams " /Users/mario/dev/projects/bento-life" " life"
118+ -- checkWithParamsProduction "/Users/mario/lamdera/test/v1" "always-v0"
119+ -- checkWithParamsProduction "/Users/mario/dev/test/ascii-art" "ascii-art-local"
120+ -- checkWithParamsProduction "/Users/mario/dev/test/lamdera-minilatex-app" "minilatex"
121+ -- checkWithParamsProduction "/Users/mario/dev/lamdera-user-projects/beat-the-big-two" "beat-the-big-two"
122+ -- checkWithParamsProduction "/Users/mario/dev/projects/lamdera-dashboard" "dashboard"
123+ -- checkWithParamsProduction "/Users/mario/dev/projects/lamdera-test" "testapp"
124+ -- checkWithParamsProduction "/Users/mario/lamdera/tmp/elm-audio-test0" "elm-audio-test0"
125+ -- checkWithParamsProduction "/Users/mario/lamdera-builds/build-test-local/staging" "test-local"
126+ checkWithParamsProduction " /Users/mario/dev/projects/bento-life" " life"
127127
128128
129129mockBuildSh projectPath appName = do
@@ -181,16 +181,26 @@ installElmHttpForRPC projectPath = do
181181
182182
183183{-| Run the `lamdera check` pipeline with specific params -}
184- checkWithParams projectPath appName = do
185- setEnv " LAMDERA_APP_NAME" appName
184+ checkWithParams projectPath = do
186185 setEnv " LOVR" " /Users/mario/dev/projects/lamdera/overrides"
187186 setEnv " LDEBUG" " 1"
188187 setEnv " ELM_HOME" " /Users/mario/elm-home-elmx-test"
188+
189+ Ext.Common. withProjectRoot projectPath $ Lamdera.CLI.Check. run_
190+
191+ unsetEnv " LOVR"
192+ unsetEnv " LDEBUG"
193+ unsetEnv " ELM_HOME"
194+
195+
196+ {-| Run the `lamdera check` pipeline as if it were run in production to invoke prod behaviour -}
197+ checkWithParamsProduction projectPath appName = do
198+ setEnv " LAMDERA_APP_NAME" appName
189199 -- setEnv "NOTPROD" "1"
190- requireEnv " TOKEN"
191200 -- setEnv "HOIST_REBUILD" "1"
192201 -- setEnv "VERSION" "1"
193202
203+ requireEnv " TOKEN"
194204 cp " /Users/mario/lamdera/runtime/src/LBR.elm" (projectPath ++ " /src/LBR.elm" )
195205 cp " /Users/mario/lamdera/runtime/src/LFR.elm" (projectPath ++ " /src/LFR.elm" )
196206 cp " /Users/mario/lamdera/runtime/src/LamderaRPC.elm" (projectPath ++ " /src/LamderaRPC.elm" )
@@ -200,17 +210,12 @@ checkWithParams projectPath appName = do
200210 cp " /Users/mario/lamdera/runtime/src/RPC_Empty.elm" (projectPath ++ " /src/RPC.elm" )
201211 cp " /Users/mario/lamdera/runtime/src/LamderaHelpers.elm" (projectPath ++ " /src/LamderaHelpers.elm" )
202212
203- Ext.Common. withProjectRoot projectPath $ Lamdera.CLI.Check. run_
204-
213+ checkWithParams projectPath
205214 unsetEnv " LAMDERA_APP_NAME"
206- unsetEnv " LOVR"
207- unsetEnv " LDEBUG"
208- unsetEnv " ELM_HOME"
209215 unsetEnv " NOTPROD"
210216 unsetEnv " VERSION"
211217
212218
213-
214219{-| Run the `lamdera check` pipeline with specific params -}
215220checkWithParamsNoDebug version projectPath appName = do
216221 unsetEnv " LDEBUG"
0 commit comments