fix: more env version write tests

See toolshed/organising#661
This commit is contained in:
2025-01-02 19:42:55 +01:00
parent f07c64f7b8
commit 3a71dc47f8
15 changed files with 661 additions and 45 deletions

View File

@ -125,6 +125,20 @@ type Features struct {
SSO string `json:"sso"`
}
func GetEnvVersionRaw(name string) (string, error) {
var version string
if strings.Contains(name, ":") {
split := strings.Split(name, ":")
if len(split) > 2 {
return version, fmt.Errorf("version seems invalid: %s", name)
}
version = split[1]
}
return version, nil
}
func Get(name string) Recipe {
version := ""
if strings.Contains(name, ":") {