Fix commitShaRev regex for some more complicated packages

Example "version" string this fixes: v0.5.0-alpha.5.0.20200819165624-17cef6e3e9d5
This commit is contained in:
adisbladis 2020-07-21 12:17:18 +02:00
parent 25d7fc13aa
commit 19394d538e
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7

View file

@ -9,7 +9,7 @@ import (
)
func parseGoSum(file string) (map[string]string, error) {
commitShaRev := regexp.MustCompile(`^v\d+\.\d+\.\d+-(?:\d+\.)?[0-9]{14}-(.*?)$`)
commitShaRev := regexp.MustCompile(`v\d+\.\d+\.\d+-[\d+\.a-zA-Z]*?[0-9]{14}-(.*?)$`)
// Read go.mod
data, err := ioutil.ReadFile(file)