Skip to content

Commit

Permalink
Support Semantic Versioning 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Sumner committed Nov 11, 2018
1 parent 7b56499 commit 5d3ab60
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 19 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ sourceCompatibility = 1.8
targetCompatibility = 1.8

group = 'com.inedo.proget'
version = '1.0'
version = '1.1'
description = 'Inedo ProGet Plugin'

ext {
Expand Down Expand Up @@ -57,7 +57,7 @@ configurations.all {
}

dependencies {
compile ('com.github.concordion.cubano:cubano-httpeasy:HttpEasySecurity-SNAPSHOT') {
compile ('com.github.concordion.cubano:cubano-httpeasy:master-SNAPSHOT') {
exclude group: 'com.github.markusbernhardt', module: 'proxy-vole'
}

Expand Down
13 changes: 2 additions & 11 deletions src/main/java/com/inedo/proget/jenkins/UploadPackageBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -475,17 +475,8 @@ public FormValidation doCheckPackageName(@QueryParameter String value) throws IO
}

public FormValidation doCheckVersion(@QueryParameter String value) throws IOException, ServletException {
int countDots = 0;

int pos = value.indexOf(".");
while (pos > -1) {
countDots++;
pos = value.indexOf(".", pos + 1);
}

if (countDots != 2) {
return FormValidation.error("Version must be in a three-part dot format eg 0.0.0");
}
if (value.length() == 0)
return FormValidation.error("This setting is required");

return FormValidation.ok();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<div>
A string representing a <a href="http://semver.org/spec/v2.0.0.html" target="_blank">Semantic Version</a>; this is a three-part, dot- specification

<p>e.g. 1.0.0</p>
A string representing a <a href="https://semver.org/" target="_blank">Semantic Version</a>; this plug-in will not do any validation
that the version is correct, however ProGet will return an error and the task will fail if the version number is not correctly formatted.
</div>
6 changes: 3 additions & 3 deletions test.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
useMockServer = true
useMockServer = false

# User Specific Properties
andre.useMockServer = false
andre.url = http://desktop-n4uj6o2:8624
andre.apiKey = 58cc79GuQrqfJCVOSw_R
andre.url = http://inedo:8624
andre.apiKey = uZq1JNNh6iKjHLts8yEP
andre.username = Admin
andre.password = Admin
andre.trustAllCertificates = false

0 comments on commit 5d3ab60

Please sign in to comment.