ソースを参照

Merge pull request #160 from csmith/master

Make Version handle -SNAPSHOT suffixes.
pull/161/head
Greg Holmes 9年前
コミット
efc1dccff5
1個のファイルの変更2行の追加2行の削除
  1. 2
    2
      src/com/dmdirc/updater/Version.java

+ 2
- 2
src/com/dmdirc/updater/Version.java ファイルの表示

@@ -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;

読み込み中…
キャンセル
保存