Skip to content

Commit

Permalink
Properly escape dots in regexes (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
fweikert authored Mar 22, 2021
1 parent 692fc00 commit d3fa36e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions versions/versions.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ const (
)

var (
releasePattern = regexp.MustCompile(`^(\d+.\d+.\d+)$`)
candidatePattern = regexp.MustCompile(`^(\d+.\d+.\d+)rc(\d+)$`)
releasePattern = regexp.MustCompile(`^(\d+\.\d+\.\d+)$`)
candidatePattern = regexp.MustCompile(`^(\d+\.\d+\.\d+)rc(\d+)$`)
latestReleasePattern = regexp.MustCompile(`^latest(?:-(?P<offset>\d+))?$`)
commitPattern = regexp.MustCompile(`^[a-z0-9]{40}$`)
)
Expand Down

0 comments on commit d3fa36e

Please sign in to comment.