From b9c087cf8a486b8c3798073740fe758263b06e5e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 30 Jun 2024 17:49:45 +0200 Subject: [PATCH] Autorework the patches/ folder structure to match new expectation from ynh_setup_source --- tools/helpers2.1/convert_to_helpers_2.1.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/helpers2.1/convert_to_helpers_2.1.py b/tools/helpers2.1/convert_to_helpers_2.1.py index 37921deb..097b22a4 100644 --- a/tools/helpers2.1/convert_to_helpers_2.1.py +++ b/tools/helpers2.1/convert_to_helpers_2.1.py @@ -392,6 +392,16 @@ def cleanup(): if "alias " in nginx_conf or "root " in nginx_conf: webapp_serving_raw_assets_probably = True + if os.path.isdir("patches"): + for file in os.listdir("patches"): + if "-" not in file: + continue + source_name, patch_name = file.split("-", 1) + if source_name == "app": + source_name = "main" + os.system(f"mkdir -p 'patches/{source_name}'") + os.system(f"git mv patches/{file} patches/{source_name}/{patch_name}") + # Add helpers_version = '2.1' after yunohost requirement in manifest raw_manifest = open("manifest.toml", "r").read() if "helpers_version" not in raw_manifest: