Browse Source

Merge pull request #160 from csmith/master

Make Version handle -SNAPSHOT suffixes.
pull/161/head
Greg Holmes 9 years ago
parent
commit
efc1dccff5
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/com/dmdirc/updater/Version.java

+ 2
- 2
src/com/dmdirc/updater/Version.java View File

@@ -63,9 +63,9 @@ public class Version implements Comparable<Version> {
63 63
             this.intVersion = Integer.parseInt(version);
64 64
             this.strVersion = null;
65 65
         } else if (version.matches(
66
-                "^[0-9]+(\\.[0-9]+)*((a|b|rc|m)[0-9]+)*(\\-[0-9]+\\-g[a-z0-9]{7})?$")) {
66
+                "^[0-9]+(\\.[0-9]+)*((a|b|rc|m)[0-9]+)*(\\-[0-9]+\\-g[a-z0-9]{7})?(-SNAPSHOT)?$")) {
67 67
             this.intVersion = Integer.MIN_VALUE;
68
-            this.strVersion = version;
68
+            this.strVersion = version.replaceAll("-SNAPSHOT$", "");
69 69
         } else {
70 70
             this.intVersion = Integer.MIN_VALUE;
71 71
             this.strVersion = null;

Loading…
Cancel
Save