Skip to content

Commit

Permalink
Fix getMajorProjectVersion Regex pattern in Go
Browse files Browse the repository at this point in the history
  • Loading branch information
dorsJfrog committed Apr 21, 2024
1 parent ca2e8fa commit c7edcaf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static int getMajorVersion(String version, Log log) {
public static int getMajorProjectVersion(String project, Log log) {
if (!StringUtils.isEmpty(project)) {
project = project.toLowerCase();
if (project.matches("^.*/v\\d")) {
if (project.matches("^.*/v\\d+")) {
String major = project.substring(project.lastIndexOf("/v") + 2);
try {
return Integer.parseInt(major);
Expand Down

0 comments on commit c7edcaf

Please sign in to comment.