change easy-installer repo directory; comment out clone function
Commented because the clone function puts the repo in a different spot than the check function does.
This commit is contained in:
parent
c471c1a9ee
commit
73139b7a45
@ -42,23 +42,24 @@ def cprint(*args, level: int = 1):
|
||||
print(CYLW, message, reset)
|
||||
|
||||
|
||||
def clone_frappe_docker_repo() -> None:
|
||||
try:
|
||||
urllib.request.urlretrieve(
|
||||
"https://github.com/frappe/frappe_docker/archive/refs/heads/main.zip",
|
||||
"frappe_docker.zip",
|
||||
)
|
||||
logging.info("Downloaded frappe_docker zip file from GitHub")
|
||||
unpack_archive(
|
||||
"frappe_docker.zip", "."
|
||||
) # Unzipping the frappe_docker.zip creates a folder "frappe_docker-main"
|
||||
move("frappe_docker-main", "frappe_docker")
|
||||
logging.info("Unzipped and Renamed frappe_docker")
|
||||
os.remove("frappe_docker.zip")
|
||||
logging.info("Removed the downloaded zip file")
|
||||
except Exception as e:
|
||||
logging.error("Download and unzip failed", exc_info=True)
|
||||
cprint("\nCloning frappe_docker Failed\n\n", "[ERROR]: ", e, level=1)
|
||||
# Commented due to mismatch with check function
|
||||
# def clone_frappe_docker_repo() -> None:
|
||||
# try:
|
||||
# urllib.request.urlretrieve(
|
||||
# "https://github.com/frappe/frappe_docker/archive/refs/heads/main.zip",
|
||||
# "frappe_docker.zip",
|
||||
# )
|
||||
# logging.info("Downloaded frappe_docker zip file from GitHub")
|
||||
# unpack_archive(
|
||||
# "frappe_docker.zip", "."
|
||||
# ) # Unzipping the frappe_docker.zip creates a folder "frappe_docker-main"
|
||||
# move("frappe_docker-main", "frappe_docker")
|
||||
# logging.info("Unzipped and Renamed frappe_docker")
|
||||
# os.remove("frappe_docker.zip")
|
||||
# logging.info("Removed the downloaded zip file")
|
||||
# except Exception as e:
|
||||
# logging.error("Download and unzip failed", exc_info=True)
|
||||
# cprint("\nCloning frappe_docker Failed\n\n", "[ERROR]: ", e, level=1)
|
||||
|
||||
|
||||
def get_from_env(dir, file) -> Dict:
|
||||
@ -112,7 +113,7 @@ def generate_pass(length: int = 12) -> str:
|
||||
|
||||
|
||||
def check_repo_exists() -> bool:
|
||||
return os.path.exists(os.path.join(os.getcwd(), "frappe_docker"))
|
||||
return os.path.exists("~/repositories/frappe_docker")
|
||||
|
||||
|
||||
def setup_prod(
|
||||
@ -125,7 +126,7 @@ def setup_prod(
|
||||
compose_file_name = os.path.join(
|
||||
os.path.expanduser("~"), f"{project}-compose.yml"
|
||||
)
|
||||
docker_repo_path = os.path.join(os.getcwd(), "frappe_docker")
|
||||
docker_repo_path = "~/repositories/frappe_docker"
|
||||
cprint(
|
||||
"\nPlease refer to .example.env file in the frappe_docker folder to know which keys to set\n\n",
|
||||
level=3,
|
||||
|
Loading…
x
Reference in New Issue
Block a user