Skip to content

Commit

Permalink
Fix version extraction issue when a comment exists (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
yogyagamage authored Jul 27, 2023
1 parent d8cf50e commit 9fcce17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/miner/BreakingUpdate.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public class BreakingUpdate {
private static final Pattern DEPENDENCY_GROUP_ID =
Pattern.compile("^\\s*<groupId>(.*)</groupId>\\s*$");
private static final Pattern PREVIOUS_VERSION =
Pattern.compile("^-\\s*<version>(.*)</version>\\s*$");
private static final Pattern NEW_VERSION = Pattern.compile("^\\+\\s*<version>(.*)</version>\\s*$");
Pattern.compile("^-\\s*<version>(.*?)</version>(?:\\s*<!--(.*?)-->)?\\s*$");
private static final Pattern NEW_VERSION = Pattern.compile("^\\+\\s*<version>(.*?)</version>(?:\\s*<!--(.*?)-->)?\\s*$");
private static final Pattern SCOPE =
Pattern.compile("^\\s*<scope>(.*)</scope>\\s*$");
private static final Pattern SEM_VER = Pattern.compile("^\\d+\\.\\d+\\.\\d+$");
Expand Down

0 comments on commit 9fcce17

Please sign in to comment.