2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-09 23:00:56 +00:00

fix: remove frappe version from .env (#1038)

This commit is contained in:
Revant Nandgaonkar 2023-01-16 05:21:14 +05:30 committed by GitHub
parent 268cdcdec1
commit 6e2e4d2143
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 12 deletions

View File

@ -3,21 +3,17 @@ import re
def get_versions():
frappe_version = os.getenv("FRAPPE_VERSION")
erpnext_version = os.getenv("ERPNEXT_VERSION")
assert frappe_version, "No Frappe version set"
assert erpnext_version, "No ERPNext version set"
return frappe_version, erpnext_version
return erpnext_version
def update_env(frappe_version: str, erpnext_version: str):
def update_env(erpnext_version: str):
with open("example.env", "r+") as f:
content = f.read()
for env, var in (
("FRAPPE_VERSION", frappe_version),
("ERPNEXT_VERSION", erpnext_version),
):
content = re.sub(rf"{env}=.*", f"{env}={var}", content)
content = re.sub(
rf"ERPNEXT_VERSION=.*", f"ERPNEXT_VERSION={erpnext_version}", content
)
f.seek(0)
f.truncate()
f.write(content)

View File

@ -1,8 +1,5 @@
# Reference: https://github.com/frappe/frappe_docker/blob/main/docs/images-and-compose-files.md
FRAPPE_VERSION=v14.22.1
# Only with ERPNext override
ERPNEXT_VERSION=v14.12.1
DB_PASSWORD=123