@@ -14,6 +14,10 @@ This template validates that if network is "hoodi", the image tag must be greate
1414{{- else if regexMatch "^[0-9]+\\.[0-9]+$" . -}}
1515 {{- /* It's a short version (e.g., 1.9) - convert to 1.9.0 */ -}}
1616 {{- printf "%s.0" . -}}
17+ {{- else if regexMatch "^[0-9]+\\.[0-9]+a[0-9]+$" . -}}
18+ {{- /* It's a semver with alpha suffix without hyphen (format: 1.10a5) */ -}}
19+ {{- $parts := regexSplit "a" . -1 -}}
20+ {{- printf "%s.0-alpha.%s" (index $parts 0) (index $parts 1) -}}
1721{{- else if regexMatch "^[0-9]+\\.[0-9]+rc[0-9]+$" . -}}
1822 {{- /* It's a semver with rc suffix without hyphen (format: 1.9rc3) */ -}}
1923 {{- $parts := regexSplit "rc" . -1 -}}
@@ -24,16 +28,16 @@ This template validates that if network is "hoodi", the image tag must be greate
2428{{- end -}}
2529{{- end -}}
2630
27- {{- /* Check if we need to validate (only for "hoodi" network ) */ -}}
28- {{- if eq $network "hoodi" -}}
31+ {{- /* Check if we need to validate (for "hoodi" and "sepolia" networks ) */ -}}
32+ {{- if or ( eq $network "hoodi") (eq $network "sepolia") -}}
2933 {{- /* Transform the tag for comparison */ -}}
3034 {{- $normalizedTag := include "semverCompare" $imageTag -}}
31-
35+
3236 {{- /* Debug - uncomment if needed */}}
3337 {{- /* fail (printf "DEBUG: Original tag: %s, Normalized: %s" $imageTag $normalizedTag) */}}
3438
3539 {{- /* Perform the validation checks */ -}}
3640 {{- if or (semverCompare "< 1.9.0" $normalizedTag) (semverCompare "< 1.9-rc3" $normalizedTag) -}}
37- {{- fail "ERROR: For network 'hoodi ', image tag must be at least '1.9.0' or '1.9rc3'" -}}
41+ {{- fail (printf "ERROR: For network '%s ', image tag must be at least '1.9.0' or '1.9rc3'" $network) -}}
3842 {{- end -}}
3943{{- end -}}
0 commit comments