mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-12-23 10:38:58 +00:00
fix: remove frappe version from .env (#1038)
This commit is contained in:
parent
268cdcdec1
commit
6e2e4d2143
14
.github/scripts/update_example_env.py
vendored
14
.github/scripts/update_example_env.py
vendored
@ -3,21 +3,17 @@ import re
|
|||||||
|
|
||||||
|
|
||||||
def get_versions():
|
def get_versions():
|
||||||
frappe_version = os.getenv("FRAPPE_VERSION")
|
|
||||||
erpnext_version = os.getenv("ERPNEXT_VERSION")
|
erpnext_version = os.getenv("ERPNEXT_VERSION")
|
||||||
assert frappe_version, "No Frappe version set"
|
|
||||||
assert erpnext_version, "No ERPNext 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:
|
with open("example.env", "r+") as f:
|
||||||
content = f.read()
|
content = f.read()
|
||||||
for env, var in (
|
content = re.sub(
|
||||||
("FRAPPE_VERSION", frappe_version),
|
rf"ERPNEXT_VERSION=.*", f"ERPNEXT_VERSION={erpnext_version}", content
|
||||||
("ERPNEXT_VERSION", erpnext_version),
|
)
|
||||||
):
|
|
||||||
content = re.sub(rf"{env}=.*", f"{env}={var}", content)
|
|
||||||
f.seek(0)
|
f.seek(0)
|
||||||
f.truncate()
|
f.truncate()
|
||||||
f.write(content)
|
f.write(content)
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
# Reference: https://github.com/frappe/frappe_docker/blob/main/docs/images-and-compose-files.md
|
# 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
|
ERPNEXT_VERSION=v14.12.1
|
||||||
|
|
||||||
DB_PASSWORD=123
|
DB_PASSWORD=123
|
||||||
|
Loading…
Reference in New Issue
Block a user