Read from .kamal/.env

To avoid conflicts with other tools that use .env files, read the files
from .kamal/ instead.

If there are no matching env files in .kamal/, we'll read from the
project root for now and emit a warning.
This commit is contained in:
Donal McBreen
2024-07-30 12:29:44 +01:00
parent ec4aa45852
commit a8837d453c
6 changed files with 34 additions and 17 deletions

View File

@@ -97,7 +97,7 @@ class MainTest < IntegrationTest
private
def assert_local_env_file(contents)
assert_equal contents, deployer_exec("cat .env", capture: true)
assert_equal contents, deployer_exec("cat .kamal/.env", capture: true)
end
def assert_envs(version:)
@@ -127,7 +127,7 @@ class MainTest < IntegrationTest
end
def remove_local_env_file
deployer_exec("rm .env")
deployer_exec("rm .kamal/.env")
end
def assert_remote_env_file(contents, vm:)