sort envvars by name

Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
jkoberg
2022-12-12 15:53:25 +01:00
committed by mmattel
parent a82b776791
commit 0bd800ac73
3 changed files with 32 additions and 23 deletions

View File

@@ -7,22 +7,6 @@ variables:
default_value: ""
description: ""
do_ignore: false
- rawname: registryAddressEnv
path: ocis-pkg/registry/registry.go:42
foundincode: true
name: registryAddressEnv
type: ""
default_value: ""
description: ""
do_ignore: false
- rawname: MICRO_LOG_LEVEL
path: ocis-pkg/log/log.go:34
foundincode: true
name: MICRO_LOG_LEVEL
type: ""
default_value: ""
description: ""
do_ignore: false
- rawname: CS3_MACHINE_AUTH_API_KEY
path: services/idp/pkg/backends/cs3/bootstrap/cs3.go:77
foundincode: true
@@ -31,10 +15,18 @@ variables:
default_value: ""
description: ""
do_ignore: false
- rawname: registryEnv
path: ocis-pkg/registry/registry.go:44
- rawname: MICRO_LOG_LEVEL
path: ocis-pkg/log/log.go:34
foundincode: true
name: registryEnv
name: MICRO_LOG_LEVEL
type: ""
default_value: ""
description: ""
do_ignore: false
- rawname: MICRO_LOG_LEVEL
path: ocis-pkg/log/log.go:30
foundincode: true
name: MICRO_LOG_LEVEL
type: ""
default_value: ""
description: ""
@@ -63,10 +55,18 @@ variables:
default_value: ""
description: ""
do_ignore: false
- rawname: MICRO_LOG_LEVEL
path: ocis-pkg/log/log.go:30
- rawname: registryAddressEnv
path: ocis-pkg/registry/registry.go:42
foundincode: true
name: MICRO_LOG_LEVEL
name: registryAddressEnv
type: ""
default_value: ""
description: ""
do_ignore: false
- rawname: registryEnv
path: ocis-pkg/registry/registry.go:44
foundincode: true
name: registryEnv
type: ""
default_value: ""
description: ""

View File

@@ -8,6 +8,7 @@ import (
"os/exec"
"path/filepath"
"regexp"
"sort"
"strings"
"text/template"
@@ -117,6 +118,12 @@ func GetRogueEnvs() {
vars.Variables = append(vars.Variables, v)
}
less := func(i, j int) bool {
return vars.Variables[i].Name < vars.Variables[j].Name
}
sort.Slice(vars.Variables, less)
output, err := yaml.Marshal(vars)
if err != nil {
log.Fatal(err)

View File

@@ -14,13 +14,15 @@
{{- if .Ignore }}
{{ continue }}
{{- end }}
a| `{{- .Name }}` +
a| [subs=-attributes]
++{{ .Type }} ++
a| [subs=-attributes]
++{{.DefaultValue}} ++
a| [subs=-attributes]
{{.Description}}
++{{.Description}} ++
a| [subs=-attributes]
{{- end }}
|===