2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2025-01-09 08:30:35 +00:00

Fix develop build (#731)

* Prevent tests from modifying $GITHUB_ENV

This fixes develop build.

* Update frappe git url in dev requirements

* Update
This commit is contained in:
Lev 2022-03-24 11:30:19 +03:00 committed by GitHub
parent 144baf9239
commit 269156ff7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 7 deletions

View File

@ -1,3 +1,3 @@
frappe @ git+git://github.com/frappe/frappe.git
frappe @ git+https://github.com/frappe/frappe.git
boto3-stubs[s3]
black==22.1.0

View File

@ -10,13 +10,12 @@ 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")
if value == "develop":
os.environ[name] = "latest"
with open(env_path, "a") as f:
@ -32,7 +31,7 @@ def env_file(tmp_path_factory: pytest.TempPathFactory):
for var in ("FRAPPE_VERSION", "ERPNEXT_VERSION"):
_add_version_var(name=var, env_path=file_path)
yield file_path
yield str(file_path)
os.remove(file_path)