mirror of
https://github.com/element-hq/ess-helm.git
synced 2026-12-05 08:12:26 -08:00
charts schemas: restructure json files
This commit is contained in:
28 files changed
+76
-80
No files matched your search
@@ -13,23 +13,19 @@ from jinja2 import Environment, FileSystemLoader, select_autoescape
|
||||
def find_sub_dirs(root_dir, dir_name):
|
||||
sub_schemas_dirs = []
|
||||
|
||||
for path in Path(root_dir).rglob(dir_name):
|
||||
for path in Path(root_dir).glob('*'):
|
||||
if path.is_dir():
|
||||
sub_schemas_dirs.append(path)
|
||||
return sub_schemas_dirs
|
||||
|
||||
|
||||
def construct_values_file(source_values_template_path: Path, destination_values_path: Path):
|
||||
charts_path = Path(__file__).parent.parent / "charts"
|
||||
shared_sub_schemas_path = "matrix-stack" / charts_path / "sub_schemas"
|
||||
charts_path = Path(__file__).parent.parent / "charts" / "matrix-stack" / "source"
|
||||
|
||||
chart_sub_schemas_path = source_values_template_path.parent / "sub_schemas"
|
||||
env = Environment(
|
||||
loader=FileSystemLoader(
|
||||
[
|
||||
source_values_template_path.parent,
|
||||
shared_sub_schemas_path,
|
||||
chart_sub_schemas_path,
|
||||
charts_path,
|
||||
*find_sub_dirs(charts_path, "sub_schemas"),
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user