From 5d3ab60d79ce0718ff84a5468887d007f5226244 Mon Sep 17 00:00:00 2001 From: Andrew Sumner Date: Sun, 11 Nov 2018 14:55:19 +1300 Subject: [PATCH] Support Semantic Versioning 2.0 --- build.gradle | 4 ++-- .../inedo/proget/jenkins/UploadPackageBuilder.java | 13 ++----------- .../jenkins/UploadPackageBuilder/help-version.html | 5 ++--- test.properties | 6 +++--- 4 files changed, 9 insertions(+), 19 deletions(-) diff --git a/build.gradle b/build.gradle index 0c276ad..a090f23 100644 --- a/build.gradle +++ b/build.gradle @@ -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 { @@ -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' } diff --git a/src/main/java/com/inedo/proget/jenkins/UploadPackageBuilder.java b/src/main/java/com/inedo/proget/jenkins/UploadPackageBuilder.java index c4e6ebd..1ec2f3f 100644 --- a/src/main/java/com/inedo/proget/jenkins/UploadPackageBuilder.java +++ b/src/main/java/com/inedo/proget/jenkins/UploadPackageBuilder.java @@ -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(); } diff --git a/src/main/resources/com/inedo/proget/jenkins/UploadPackageBuilder/help-version.html b/src/main/resources/com/inedo/proget/jenkins/UploadPackageBuilder/help-version.html index 27db822..e6ba693 100644 --- a/src/main/resources/com/inedo/proget/jenkins/UploadPackageBuilder/help-version.html +++ b/src/main/resources/com/inedo/proget/jenkins/UploadPackageBuilder/help-version.html @@ -1,5 +1,4 @@
- A string representing a Semantic Version; this is a three-part, dot- specification - -

e.g. 1.0.0

+ A string representing a Semantic Version; 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.
diff --git a/test.properties b/test.properties index 91de0b6..d1cb7c1 100644 --- a/test.properties +++ b/test.properties @@ -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 \ No newline at end of file