mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-26 09:05:10 +00:00
Prevent tests from modifying $GITHUB_ENV
This fixes develop build.
This commit is contained in:
parent
57d273c512
commit
9fc6b2fe3d
1 changed files with 6 additions and 7 deletions
|
|
@ -10,17 +10,16 @@ from tests.utils import CI, Compose
|
|||
|
||||
|
||||
def _add_version_var(name: str, env_path: Path):
|
||||
if not os.getenv(name):
|
||||
value = os.getenv(name)
|
||||
|
||||
if not value:
|
||||
return
|
||||
|
||||
if (gh_env := os.getenv("GITHUB_ENV")) and os.environ[name] == "develop":
|
||||
with open(gh_env, "a") as f:
|
||||
f.write(f"\n{name}=latest")
|
||||
|
||||
os.environ[name] = "latest"
|
||||
if value == "develop":
|
||||
value = "latest"
|
||||
|
||||
with open(env_path, "a") as f:
|
||||
f.write(f"\n{name}={os.environ[name]}")
|
||||
f.write(f"\n{name}={value}")
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
|
|
|
|||
Loading…
Reference in a new issue