Skip to content

Commit

Permalink
loosen ld flag parsing requirements
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
  • Loading branch information
wagoodman committed Jun 14, 2024
1 parent 047871d commit 861a911
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions syft/pkg/cataloger/golang/parse_go_binary.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ var (
// inject the correct version into the main module of the build process

knownBuildFlagPatterns = []*regexp.Regexp{
regexp.MustCompile(`(?m)\.(TiDB)?([gG]it)?([bB]uild)?([rR]elease)?[vV]er(sion)?=(\S+/)*(?P<version>v?\d+.\d+.\d+[-\w]*)`),
regexp.MustCompile(`(?m)\.([tT]ag)=(\S+/)*(?P<version>v?\d+.\d+.\d+[-\w]*)`),
regexp.MustCompile(`(?m)\.[a-zA-Z0-9]*([rR]elease)?([gG]it)?([bB]uild)?[vV]er(sion)?=(\S+/)*(?P<version>v?\d+.\d+.\d+[-\w]*)`),
regexp.MustCompile(`(?m)\.[a-zA-Z0-9]*([tT]ag)=(\S+/)*(?P<version>v?\d+.\d+.\d+[-\w]*)`),
}
)

Expand Down

0 comments on commit 861a911

Please sign in to comment.