Skip to content

Commit

Permalink
fix: make the version -34-g... optional
Browse files Browse the repository at this point in the history
Make sure validation works for tagged versions.

Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
smira committed Jul 8, 2024
1 parent 2c7bb38 commit 4313acf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/extensions-validator/cmd/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ var (
// Eg:
// 535.129.03-v1.8.0-alpha.0-10-g336fa0f-dirty
// 535.129.03-v1.8.0-alpha.0-10-g336fa0f
buildArgRegex = regexp.MustCompile(`^(\d+\.\d+\.\d+)-v(\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?)-(\d+)-g([0-9a-f]+)(-dirty)?$`)
buildArgRegex = regexp.MustCompile(`^(\d+\.\d+\.\d+)-v(\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?)(-(\d+)-g([0-9a-f]+)(-dirty)?)?$`)
// commitBuildArgRegex is a regex to match a commit build arg version.
// Eg:
// 5815ee3-v1.8.0-alpha.0-10-g336fa0f-dirty
// 5815ee3-v1.8.0-alpha.0-10-g336fa0f
commitBuildArgRegex = regexp.MustCompile(`^([0-9a-f]+)-v(\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?)-(\d+)-g([0-9a-f]+)(-dirty)?$`)
commitBuildArgRegex = regexp.MustCompile(`^([0-9a-f]+)-v(\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?)(-(\d+)-g([0-9a-f]+)(-dirty)?)?$`)
// partialSemverRegex is a regex to match a partial semver version.
// Eg:
// v4.3
Expand Down

0 comments on commit 4313acf

Please sign in to comment.