2023-12-06 15:24:02 +01:00
|
|
|
package generator
|
|
|
|
|
2024-11-18 17:12:12 +01:00
|
|
|
import (
|
|
|
|
"regexp"
|
2025-08-03 15:54:58 +02:00
|
|
|
|
2025-08-19 23:58:51 +02:00
|
|
|
"katenary.io/internal/generator/labels"
|
2024-11-18 17:12:12 +01:00
|
|
|
)
|
2023-12-06 15:24:02 +01:00
|
|
|
|
|
|
|
var (
|
|
|
|
// find all labels starting by __replace_ and ending with ":"
|
|
|
|
// and get the value between the quotes
|
|
|
|
// ?s => multiline
|
|
|
|
// (?P<inc>.+?) => named capture group to "inc" variable (so we could use $inc in the replace)
|
|
|
|
replaceLabelRegexp = regexp.MustCompile(`(?s)__replace_.+?: '(?P<inc>.+?)'`)
|
|
|
|
|
|
|
|
// Standard annotationss
|
|
|
|
Annotations = map[string]string{
|
2024-11-18 17:12:12 +01:00
|
|
|
labels.LabelName("version"): Version,
|
2023-12-06 15:24:02 +01:00
|
|
|
}
|
|
|
|
)
|