mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-22 13:39:24 -06:00
Bugfixing
Co-authored-by: Martin <github@diemattels.at> Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
committed by
mmattel
parent
8817d634bd
commit
879f7996e3
@@ -55,14 +55,15 @@ func GetRogueEnvs() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
fmt.Println("Gathering variable definitions from source")
|
||||
out, err := exec.Command("bash", "-c", "grep -R os.Getenv | grep -v rogue-env.go").Output()
|
||||
out, err := exec.Command("bash", "-c", "grep -R os.Getenv | grep -v rogue-env.go |grep \\.go").Output()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
lines := strings.Split(string(out), "\n")
|
||||
for _, l := range lines {
|
||||
r := strings.SplitN(l, ":\t", 2)
|
||||
if r[0] != "" && r[1] != "" {
|
||||
if len(r) == 2 && r[0] != "" && r[1] != "" {
|
||||
fmt.Printf("Parsing %s\n", r[0])
|
||||
res := re.FindAll([]byte(r[1]), -1)
|
||||
for _, item := range res {
|
||||
AddUniqueToStruct(vars, Variable{Name: strings.Trim(string(item), "\""), Type: ""})
|
||||
@@ -76,7 +77,7 @@ func GetRogueEnvs() {
|
||||
fmt.Printf("Writing new variable definitions to %s\n", fullYamlPath)
|
||||
err = ioutil.WriteFile(fullYamlPath, output, 0666)
|
||||
if err != nil {
|
||||
log.Fatal("could not write %s", fullYamlPath)
|
||||
log.Fatalf("could not write %s", fullYamlPath)
|
||||
}
|
||||
if err := os.Chdir(curdir); err != nil {
|
||||
log.Fatal(err)
|
||||
|
||||
16
docs/templates/ADOC_global.tmpl
vendored
16
docs/templates/ADOC_global.tmpl
vendored
@@ -1,13 +1,13 @@
|
||||
// set the attribute to true or leave empty, true without any quotes.
|
||||
// collected through docs/helpers/rougeEnv.go
|
||||
|
||||
[caption=]
|
||||
.Global environment Variables
|
||||
.Environment variables with global scope not included in a service
|
||||
[width="100%",cols="~,~,~,~",options="header"]
|
||||
| === |
|
||||
| Name |
|
||||
| Type |
|
||||
| Default Value |
|
||||
| Description |
|
||||
|===
|
||||
| Name
|
||||
| Type
|
||||
| Default Value
|
||||
| Description
|
||||
|
||||
{{- range .Variables}}
|
||||
|
||||
@@ -20,4 +20,4 @@ a| [subs=-attributes]
|
||||
{{.Description}}
|
||||
|
||||
{{- end }}
|
||||
| === |
|
||||
|===
|
||||
|
||||
Reference in New Issue
Block a user