From ee16285aee05e6d482f46e36ed60064b0ae1543a Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 9 May 2014 20:57:21 +0300 Subject: [PATCH] Support passing multiple versions Change-Id: I5aae200f8e49e1f9f53bbf53ceba1551854d013e --- .../FetchReleaseNotesTickets.java | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java b/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java index 6434c94352..028880b2e1 100644 --- a/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java +++ b/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java @@ -17,6 +17,7 @@ package com.vaadin.buildhelpers; import java.io.IOException; import java.io.InputStream; +import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import java.util.List; @@ -24,7 +25,7 @@ import java.util.List; import org.apache.commons.io.IOUtils; public class FetchReleaseNotesTickets { - private static final String queryURL = "http://dev.vaadin.com/query?status=closed&milestone=Vaadin+@version@&resolution=fixed&col=id&col=summary&col=owner&col=type&col=priority&col=component&col=version&col=bfptime&col=fv&format=tab&order=id"; + private static final String queryURL = "http://dev.vaadin.com/query?status=closed&@milestone@&resolution=fixed&col=id&col=summary&col=owner&col=type&col=priority&col=component&col=version&col=bfptime&col=fv&format=tab&order=id"; private static final String ticketTemplate = "" + "@badge@" // + "#@ticket@" // @@ -32,12 +33,25 @@ public class FetchReleaseNotesTickets { + ""; // public static void main(String[] args) throws IOException { - String version = System.getProperty("vaadin.version"); - if (version == null || version.equals("")) { + String versions = System.getProperty("vaadin.version"); + if (versions == null || versions.equals("")) { usage(); } + String milestone = ""; + for (String version : versions.split(" ")) { + if (!milestone.equals("")) { + milestone += "&"; + } + milestone += "milestone=Vaadin+" + version; + } + + printMilestone(milestone); + } + + private static void printMilestone(String milestone) + throws MalformedURLException, IOException { - URL url = new URL(queryURL.replace("@version@", version)); + URL url = new URL(queryURL.replace("@milestone@", milestone)); URLConnection connection = url.openConnection(); InputStream urlStream = connection.getInputStream(); -- 2.39.5