mirror of
https://github.com/frappe/frappe_docker.git
synced 2025-01-27 00:58:31 +00:00
Print .env in tests, if version is develop, change to latest (for tag)
This commit is contained in:
parent
5780727208
commit
50d569ba27
@ -96,14 +96,23 @@ def docker_compose(*cmd: str):
|
|||||||
@log("Setup .env")
|
@log("Setup .env")
|
||||||
def setup_env():
|
def setup_env():
|
||||||
shutil.copy("example.env", "tests/.env")
|
shutil.copy("example.env", "tests/.env")
|
||||||
if CI:
|
if not CI:
|
||||||
with open("tests/.env", "a") as f:
|
return
|
||||||
f.write(
|
frappe_version = os.getenv("FRAPPE_VERSION")
|
||||||
f"""
|
if frappe_version == "develop":
|
||||||
FRAPPE_VERSION={os.getenv("FRAPPE_VERSION")}
|
frappe_version = "latest"
|
||||||
ERPNEXT_VERSION={os.getenv("ERPNEXT_VERSION")}
|
erpnext_version = os.getenv("ERPNEXT_VERSION")
|
||||||
|
if erpnext_version == "develop":
|
||||||
|
erpnext_version = "latest"
|
||||||
|
with open("tests/.env", "a") as f:
|
||||||
|
f.write(
|
||||||
|
f"""
|
||||||
|
FRAPPE_VERSION={frappe_version}
|
||||||
|
ERPNEXT_VERSION={erpnext_version}
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
with open("tests/.env") as f:
|
||||||
|
print(f.read())
|
||||||
|
|
||||||
|
|
||||||
@log("Print compose configuration")
|
@log("Print compose configuration")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user