summaryrefslogtreecommitdiffstats
path: root/buildhelpers
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
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')
-rw-r--r--buildhelpers/build.xml7
-rw-r--r--buildhelpers/ivy.xml4
-rw-r--r--buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java46
3 files changed, 56 insertions, 1 deletions
diff --git a/buildhelpers/build.xml b/buildhelpers/build.xml
index c7b9eba9d3..b56209f6cc 100644
--- a/buildhelpers/build.xml
+++ b/buildhelpers/build.xml
@@ -36,6 +36,13 @@
</antcall>
</target>
+ <target name="fetch-release-notes-tickets">
+ <antcall target="common.exec-buildhelper">
+ <param name="main.class" value="com.vaadin.buildhelpers.FetchReleaseNotesTickets" />
+ <param name="output" value="${output}" />
+ </antcall>
+ </target>
+
<target name="tests" depends="checkstyle">
<!--<antcall target="common.tests.run" />-->
<echo>WHAT? No JUnit tests for ${module.name}!</echo>
diff --git a/buildhelpers/ivy.xml b/buildhelpers/ivy.xml
index ba44ebfc3f..d8e4457296 100644
--- a/buildhelpers/ivy.xml
+++ b/buildhelpers/ivy.xml
@@ -27,6 +27,8 @@
<artifact type="pom" ext="pom" />
</publications>
- <dependencies />
+ <dependencies>
+ <dependency org="commons-io" name="commons-io" rev="1.4" />
+ </dependencies>
</ivy-module>
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);
+ }
+}