Skip to content

Commit

Permalink
AsteriskVersion.java: Correct certified Asterisk version matching
Browse files Browse the repository at this point in the history
Between the 18.9-cert4 and 18.9-cert5 versions of certified Asterisk, the version string format was switched from using a `/` separator to using a `-`, so we need to take that in to account.

Certified Asterisk 20+ has always used the hyphen separator.
  • Loading branch information
seanbright committed Aug 12, 2024
1 parent ac3b72d commit 8e28c91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/asteriskjava/AsteriskVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ public class AsteriskVersion implements Comparable<AsteriskVersion>, Serializabl
private final String versionString;
private final Pattern patterns[];

private static final String VERSION_PATTERN_CERTIFIED_20 = "^\\s*Asterisk certified/(GIT-)?20[-. ].*";
private static final String VERSION_PATTERN_CERTIFIED_18 = "^\\s*Asterisk certified/(GIT-)?18[-. ].*";
private static final String VERSION_PATTERN_CERTIFIED_20 = "^\\s*Asterisk certified-(GIT-)?20[-. ].*";
private static final String VERSION_PATTERN_CERTIFIED_18 = "^\\s*Asterisk certified[-/](GIT-)?18[-. ].*";
private static final String VERSION_PATTERN_CERTIFIED_16 = "^\\s*Asterisk certified/(GIT-)?16[-. ].*";
private static final String VERSION_PATTERN_CERTIFIED_13 = "^\\s*Asterisk certified/((SVN-branch|GIT)-)?13[-. ].*";

Expand Down

0 comments on commit 8e28c91

Please sign in to comment.