fix filelist in template
All checks were successful
ci/woodpecker/pr/build-package Pipeline was successful

This commit is contained in:
Robert Kaussow 2024-04-23 20:45:57 +02:00
parent bec96e6c36
commit 0eb902f8fd
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 8 additions and 6 deletions

View File

@ -10,7 +10,6 @@ steps:
image: quay.io/thegeeklab/kube-tools image: quay.io/thegeeklab/kube-tools
commands: commands:
- make - make
- cat dist/helm.toolkit.fluxcd.io/all-anyOf.json
- name: publish - name: publish
image: quay.io/thegeeklab/wp-git-action image: quay.io/thegeeklab/wp-git-action

View File

@ -1,14 +1,17 @@
{ {
"{{ ds "type" }}": [ "{{ ds "type" }}": [
{{- $path := ds "source" }} {{- $path := ds "source" }}
{{- $filelist := file.ReadDir $path }} {{- $filelist := coll.Slice }}
{{- $length := len $filelist}} {{- range $item := file.ReadDir $path }}
{{- range $i, $item := $filelist }} {{- if $item | strings.HasPrefix "all-" }}{{ continue }}{{ end }}
{{- $filelist = $filelist | coll.Append $item }}
{{- end }}
{{- $last := sub (len $filelist) 1 }}
{{- range $i, $item := $filelist | coll.Sort }}
{{- if $item | strings.HasPrefix "all-" }}{{ continue }}{{ end }} {{- if $item | strings.HasPrefix "all-" }}{{ continue }}{{ end }}
{{- if $i }},{{ end }}
{ {
"$ref": "https://gitea.rknet.org/infra/crds-catalog/raw/branch/catalog/{{ $path | path.Base }}/{{ $item }}" "$ref": "https://gitea.rknet.org/infra/crds-catalog/raw/branch/catalog/{{ $path | path.Base }}/{{ $item }}"
} }{{ if ne $i $last }},{{ end }}
{{- end }} {{- end }}
] ]
} }