Skip to content

Commit 18d9a78

Browse files
committed
More general versions
1 parent 902cbf4 commit 18d9a78

File tree

1 file changed

+3
-1
lines changed
  • src/main/java/de/neuwirthinformatik/Alexander/GitJarUpdate

1 file changed

+3
-1
lines changed

src/main/java/de/neuwirthinformatik/Alexander/GitJarUpdate/Version.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ public Version(String version) {
1515
if(version == null)
1616
throw new IllegalArgumentException("Version can not be null");
1717
if(!version.matches("[0-9]+(\\.[0-9]+)*"))
18-
throw new IllegalArgumentException("Invalid version format");
18+
throw new IllegalArgumentException("Invalid version format: " + version);
19+
if(!version.matches("v[0-9]+(\\.[0-9]+)*"))
20+
version = version.substring(1);
1921
this.version = version;
2022
}
2123

0 commit comments

Comments
 (0)