Pārlūkot izejas kodu

Make Version handle -SNAPSHOT suffixes.

This is kinda needed for the client to work now.
pull/160/head
Chris Smith 9 gadus atpakaļ
vecāks
revīzija
c2d6f50431
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2
    2
      src/com/dmdirc/updater/Version.java

+ 2
- 2
src/com/dmdirc/updater/Version.java Parādīt failu

63
             this.intVersion = Integer.parseInt(version);
63
             this.intVersion = Integer.parseInt(version);
64
             this.strVersion = null;
64
             this.strVersion = null;
65
         } else if (version.matches(
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
             this.intVersion = Integer.MIN_VALUE;
67
             this.intVersion = Integer.MIN_VALUE;
68
-            this.strVersion = version;
68
+            this.strVersion = version.replaceAll("-SNAPSHOT$", "");
69
         } else {
69
         } else {
70
             this.intVersion = Integer.MIN_VALUE;
70
             this.intVersion = Integer.MIN_VALUE;
71
             this.strVersion = null;
71
             this.strVersion = null;

Notiek ielāde…
Atcelt
Saglabāt