1
0
Fork 0
mirror of https://github.com/YunoHost/apps.git synced 2024-09-03 20:06:07 +02:00
This commit is contained in:
lapineige 2024-02-25 15:26:11 +01:00 committed by Alexandre Aubin
parent ab886e3070
commit cf92b38acc

View file

@ -45,7 +45,7 @@ from urllib import parse
from secrets import token_urlsafe
#### GLOBAL VARIABLES
YOLOGEN_VERSION = "0.8.1"
YOLOGEN_VERSION = "0.8.2"
GENERATOR_DICT = {"GENERATOR_VERSION": YOLOGEN_VERSION}
#### Create FLASK and Jinja Environments
@ -592,6 +592,7 @@ def main_form_route():
app_files = [
AppFile("manifest", "manifest.toml"),
AppFile("tests", "tests.toml"), # TODO test this
AppFile("_common.sh", "scripts/_common.sh"),
AppFile("install", "scripts/install"),
AppFile("remove", "scripts/remove"),
@ -600,7 +601,7 @@ def main_form_route():
AppFile("upgrade", "scripts/upgrade"),
AppFile("nginx", "conf/nginx.conf"),
]
if main_form.enable_change_url.data:
app_files.append(AppFile("change_url", "scripts/change_url"))
@ -610,7 +611,7 @@ def main_form_route():
# TODO : buggy, tries to open php.j2
# if main_form.main_technology.data == "php":
# app_files.append(AppFile("php", "conf/extra_php-fpm.conf"))
if main_form.description.data:
app_files.append(AppFile("DESCRIPTION", "docs/DESCRIPTION.md"))
@ -639,10 +640,11 @@ def main_form_route():
app_file.content = re.sub(r'\n\s+$', '\n', app_file.content, flags=re.M)
app_file.content = re.sub(r'\n{3,}', '\n\n', app_file.content, flags=re.M)
# TODO
#if main_form.use_custom_config_file:
# app_files.append(AppFile("appconf", "conf/" + main_form.custom_config_file))
# app_files[-1].content = main_form.custom_config_file_content
if main_form.use_custom_config_file:
app_files.append(AppFile("appconf", "conf/" + main_form.custom_config_file.data))
app_files[-1].content = main_form.custom_config_file_content.data
print(main_form.custom_config_file.data)
print(main_form.custom_config_file_content.data)
# TODO : same for cron job
if submit_mode == "download":