fix: wording
This commit is contained in:
parent
4c186678b8
commit
b98397144a
|
@ -114,7 +114,7 @@ If you have a Hub account you can have Abra log you in to avoid this. Pass
|
||||||
logMsg = fmt.Sprintf("ensuring %v recipe is up-to-date", barLength)
|
logMsg = fmt.Sprintf("ensuring %v recipe is up-to-date", barLength)
|
||||||
} else {
|
} else {
|
||||||
barLength = len(repos)
|
barLength = len(repos)
|
||||||
logMsg = fmt.Sprintf("ensuring %v recipes are up-to-date, this could take some time...", barLength)
|
logMsg = fmt.Sprintf("ensuring %v recipes are cloned & up-to-date, this could take some time...", barLength)
|
||||||
}
|
}
|
||||||
|
|
||||||
if !internal.SkipUpdates {
|
if !internal.SkipUpdates {
|
||||||
|
|
|
@ -147,7 +147,7 @@ func UpdateLabel(pattern, serviceName, label, recipeName string) error {
|
||||||
|
|
||||||
if !discovered {
|
if !discovered {
|
||||||
logrus.Warn("no existing label found, automagic insertion not supported yet")
|
logrus.Warn("no existing label found, automagic insertion not supported yet")
|
||||||
logrus.Fatalf("add \"%s\" manually to the 'app' service in %s", label, composeFile)
|
logrus.Fatalf("add '- \"%s\"' manually to the 'app' service in %s", label, composeFile)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -418,6 +418,7 @@ func GetRecipeFeaturesAndCategory(recipeName string) (Features, string, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
readmeMetadata, err := GetStringInBetween( // Find text between delimiters
|
readmeMetadata, err := GetStringInBetween( // Find text between delimiters
|
||||||
|
recipeName,
|
||||||
string(readmeFS),
|
string(readmeFS),
|
||||||
"<!-- metadata -->", "<!-- endmetadata -->",
|
"<!-- metadata -->", "<!-- endmetadata -->",
|
||||||
)
|
)
|
||||||
|
@ -499,13 +500,13 @@ func GetImageMetadata(imageRowString, recipeName string) (Image, error) {
|
||||||
|
|
||||||
imgString := imgFields[0]
|
imgString := imgFields[0]
|
||||||
|
|
||||||
imageName, err := GetStringInBetween(imgString, "[", "]")
|
imageName, err := GetStringInBetween(recipeName, imgString, "[", "]")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Fatal(err)
|
logrus.Fatal(err)
|
||||||
}
|
}
|
||||||
img.Image = strings.ReplaceAll(imageName, "`", "")
|
img.Image = strings.ReplaceAll(imageName, "`", "")
|
||||||
|
|
||||||
imageURL, err := GetStringInBetween(imgString, "(", ")")
|
imageURL, err := GetStringInBetween(recipeName, imgString, "(", ")")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logrus.Fatal(err)
|
logrus.Fatal(err)
|
||||||
}
|
}
|
||||||
|
@ -515,17 +516,17 @@ func GetImageMetadata(imageRowString, recipeName string) (Image, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetStringInBetween returns empty string if no start or end string found
|
// GetStringInBetween returns empty string if no start or end string found
|
||||||
func GetStringInBetween(str, start, end string) (result string, err error) {
|
func GetStringInBetween(recipeName, str, start, end string) (result string, err error) {
|
||||||
s := strings.Index(str, start)
|
s := strings.Index(str, start)
|
||||||
if s == -1 {
|
if s == -1 {
|
||||||
return "", fmt.Errorf("marker string %s not found", start)
|
return "", fmt.Errorf("%s: marker string %s not found", recipeName, start)
|
||||||
}
|
}
|
||||||
|
|
||||||
s += len(start)
|
s += len(start)
|
||||||
e := strings.Index(str[s:], end)
|
e := strings.Index(str[s:], end)
|
||||||
|
|
||||||
if e == -1 {
|
if e == -1 {
|
||||||
return "", fmt.Errorf("end marker %s not found", end)
|
return "", fmt.Errorf("%s: end marker %s not found", recipeName, end)
|
||||||
}
|
}
|
||||||
|
|
||||||
return str[s : s+e], nil
|
return str[s : s+e], nil
|
||||||
|
|
Loading…
Reference in New Issue