summaryrefslogtreecommitdiffstats
path: root/buildhelpers/src
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2013-02-18 21:31:32 +0200
committerVaadin Code Review <review@vaadin.com>2013-02-19 15:07:44 +0000
commitf09c12fd97cbafd10b31c79a55bd90dfef02f4a9 (patch)
tree5030cc74358b7615eaf81833eed41ecf6c9e519d /buildhelpers/src
parent9da1979af798324cbe1eea2b6adde0886774f73b (diff)
downloadvaadin-framework-f09c12fd97cbafd10b31c79a55bd90dfef02f4a9.tar.gz
vaadin-framework-f09c12fd97cbafd10b31c79a55bd90dfef02f4a9.zip
Imported and updated release notes builder (#10918)
Change-Id: Ie21d448f89d0fab6b7732a0137c80172e9da8e69 Ticket: 10918
Diffstat (limited to 'buildhelpers/src')
-rw-r--r--buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java46
1 files changed, 46 insertions, 0 deletions
diff --git a/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java b/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java
new file mode 100644
index 0000000000..76952bb329
--- /dev/null
+++ b/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java
@@ -0,0 +1,46 @@
+package com.vaadin.buildhelpers;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.net.URLConnection;
+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&amp;milestone=Vaadin+@version@&amp;resolution=fixed&amp;format=tab&amp;order=id";
+ private static final String ticketTemplate = " <li><a href=\"http://dev.vaadin.com/ticket/@ticket@\">#@ticket@</a>: @description@</li>";
+
+ public static void main(String[] args) throws IOException {
+ String version = System.getProperty("vaadin.version");
+ if (version == null || version.equals("")) {
+ usage();
+ }
+
+ URL url = new URL(queryURL.replace("@version@", version));
+ URLConnection connection = url.openConnection();
+ InputStream urlStream = connection.getInputStream();
+
+ @SuppressWarnings("unchecked")
+ List<String> tickets = IOUtils.readLines(urlStream);
+
+ for (String ticket : tickets) {
+ String[] fields = ticket.split("\t");
+ if ("id".equals(fields[0])) {
+ // This is the header
+ continue;
+ }
+ System.out.println(ticketTemplate.replace("@ticket@", fields[0])
+ .replace("@description@", fields[1]));
+ }
+ urlStream.close();
+ }
+
+ private static void usage() {
+ System.err.println("Usage: "
+ + FetchReleaseNotesTickets.class.getSimpleName()
+ + " -Dvaadin.version=<version>");
+ System.exit(1);
+ }
+}