mirror of
https://github.com/frappe/frappe_docker.git
synced 2025-02-03 12:38:29 +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:
parent
144baf9239
commit
269156ff7d
@ -1,3 +1,3 @@
|
|||||||
frappe @ git+git://github.com/frappe/frappe.git
|
frappe @ git+https://github.com/frappe/frappe.git
|
||||||
boto3-stubs[s3]
|
boto3-stubs[s3]
|
||||||
black==22.1.0
|
black==22.1.0
|
||||||
|
@ -10,13 +10,12 @@ from tests.utils import CI, Compose
|
|||||||
|
|
||||||
|
|
||||||
def _add_version_var(name: str, env_path: Path):
|
def _add_version_var(name: str, env_path: Path):
|
||||||
if not os.getenv(name):
|
value = os.getenv(name)
|
||||||
|
|
||||||
|
if not value:
|
||||||
return
|
return
|
||||||
|
|
||||||
if (gh_env := os.getenv("GITHUB_ENV")) and os.environ[name] == "develop":
|
if value == "develop":
|
||||||
with open(gh_env, "a") as f:
|
|
||||||
f.write(f"\n{name}=latest")
|
|
||||||
|
|
||||||
os.environ[name] = "latest"
|
os.environ[name] = "latest"
|
||||||
|
|
||||||
with open(env_path, "a") as f:
|
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"):
|
for var in ("FRAPPE_VERSION", "ERPNEXT_VERSION"):
|
||||||
_add_version_var(name=var, env_path=file_path)
|
_add_version_var(name=var, env_path=file_path)
|
||||||
|
|
||||||
yield file_path
|
yield str(file_path)
|
||||||
os.remove(file_path)
|
os.remove(file_path)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user