mirror of
https://github.com/MAGICGrants/truenas-apps.git
synced 2026-01-08 20:18:01 -05:00
Publish new changes in catalog [skip ci]
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
app_version: 2.22.0
|
||||
app_version: 2.22.1
|
||||
capabilities: []
|
||||
categories:
|
||||
- media
|
||||
@@ -29,4 +29,4 @@ sources:
|
||||
- https://github.com/maintainerr/Maintainerr
|
||||
title: Maintainerr
|
||||
train: community
|
||||
version: 1.0.21
|
||||
version: 1.0.22
|
||||
@@ -1,7 +1,7 @@
|
||||
images:
|
||||
image:
|
||||
repository: ghcr.io/maintainerr/maintainerr
|
||||
tag: 2.22.0
|
||||
tag: 2.22.1
|
||||
container_utils_image:
|
||||
repository: ixsystems/container-utils
|
||||
tag: 1.0.2
|
||||
@@ -37,4 +37,4 @@ sources:
|
||||
- https://hub.docker.com/r/opencloudeu/opencloud-rolling
|
||||
title: OpenCloud
|
||||
train: community
|
||||
version: 1.0.21
|
||||
version: 1.0.22
|
||||
@@ -9,3 +9,8 @@ migrations:
|
||||
max_version: 1.0.18
|
||||
target:
|
||||
min_version: 1.0.19
|
||||
- file: fix_csp
|
||||
from:
|
||||
max_version: 1.0.20
|
||||
target:
|
||||
min_version: 1.0.22
|
||||
28
trains/community/opencloud/1.0.22/migrations/fix_csp
Executable file
28
trains/community/opencloud/1.0.22/migrations/fix_csp
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
import yaml
|
||||
|
||||
|
||||
def migrate(values):
|
||||
new_csp = []
|
||||
for x in values["opencloud"]["additional_csp"]:
|
||||
new_item = {"directive": x["directive"], "items": []}
|
||||
for i in x["items"]:
|
||||
if isinstance(i, str):
|
||||
new_item["items"].append({"value": i, "placeholder": ""})
|
||||
else:
|
||||
new_item["items"].append(i)
|
||||
new_csp.append(new_item) # ← This line was missing!
|
||||
values["opencloud"]["additional_csp"] = new_csp
|
||||
return values
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 2:
|
||||
exit(1)
|
||||
|
||||
if os.path.exists(sys.argv[1]):
|
||||
with open(sys.argv[1], "r") as f:
|
||||
print(yaml.dump(migrate(yaml.safe_load(f.read()))))
|
||||
@@ -12,7 +12,8 @@
|
||||
{% do csp.x.update({key: values}) %}
|
||||
{% endfor %}
|
||||
{% for x in values.opencloud.additional_csp %}
|
||||
{% set values = csp.x.get(x.directive, []) + x['items'] %}
|
||||
{% set list_items = x['items'] | map(attribute="value") | list %}
|
||||
{% set values = csp.x.get(x.directive, []) + list_items %}
|
||||
{% do csp.x.update({x.directive: values}) %}
|
||||
{% endfor %}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user