Merge pull request #184 from rocky-linux/fix-nvr-checks

add ^ as a character for release tag
This commit is contained in:
resf-prow[bot] 2024-04-24 20:54:39 +00:00 committed by GitHub
commit 2189a988d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,8 +31,9 @@
package rpmutils package rpmutils
import ( import (
"github.com/rocky-linux/srpmproc/pkg/rpmutils"
"regexp" "regexp"
"github.com/rocky-linux/srpmproc/pkg/rpmutils"
) )
var ( var (
@ -48,7 +49,7 @@ var (
func NVR() *regexp.Regexp { func NVR() *regexp.Regexp {
if nvr == nil { if nvr == nil {
nvr = regexp.MustCompile("^(\\S+)-([\\w~%.+^]+)-(\\w+(?:\\.[\\w~%+]+)+?)(?:\\.(\\w+))?(?:\\.rpm)?$") nvr = regexp.MustCompile("^(\\S+)-([\\w~%.+^]+)-(\\w+(?:\\.[\\w~%+^]+)+?)(?:\\.(\\w+))?(?:\\.rpm)?$")
} }
return nvr return nvr
} }