|
|
@@ -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 = "<tr>" |
|
|
|
+ "@badge@" // |
|
|
|
+ "<td class=\"ticket\"><a href=\"http://dev.vaadin.com/ticket/@ticket@\">#@ticket@</a></td>" // |
|
|
@@ -32,12 +33,25 @@ public class FetchReleaseNotesTickets { |
|
|
|
+ "</tr>"; // |
|
|
|
|
|
|
|
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(); |
|
|
|
|