From f09c12fd97cbafd10b31c79a55bd90dfef02f4a9 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 18 Feb 2013 21:31:32 +0200 Subject: [PATCH] Imported and updated release notes builder (#10918) Change-Id: Ie21d448f89d0fab6b7732a0137c80172e9da8e69 Ticket: 10918 --- all/build.xml | 6 +++ build/bin/closed-to-rn.py | 16 ------- buildhelpers/build.xml | 7 +++ buildhelpers/ivy.xml | 4 +- .../FetchReleaseNotesTickets.java | 46 +++++++++++++++++++ client-compiled/build.xml | 3 ++ common.xml | 34 +++++++++++--- uitest/build.xml | 4 ++ 8 files changed, 97 insertions(+), 23 deletions(-) delete mode 100644 build/bin/closed-to-rn.py create mode 100644 buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java diff --git a/all/build.xml b/all/build.xml index ef8ac71c4d..40d82b3d47 100644 --- a/all/build.xml +++ b/all/build.xml @@ -35,6 +35,9 @@ + + + @@ -76,6 +79,9 @@ + + + diff --git a/build/bin/closed-to-rn.py b/build/bin/closed-to-rn.py deleted file mode 100644 index 0928877e1c..0000000000 --- a/build/bin/closed-to-rn.py +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/python - -import sys,string - -filename = sys.argv[1] - -fin = open(filename, "r") -lines = fin.readlines() -fin.close() - -for line in lines: - fields = string.split(line, "\t") - - if fields[0] != "id": - ticketid = "#%s" % (fields[0],fields[0]) - print "
  • %s: %s
  • " % (ticketid, fields[1]) 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 @@
    + + + + + + + WHAT? No JUnit tests for ${module.name}! 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 @@ - + + + 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&milestone=Vaadin+@version@&resolution=fixed&format=tab&order=id"; + private static final String ticketTemplate = "
  • #@ticket@: @description@
  • "; + + 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 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="); + System.exit(1); + } +} diff --git a/client-compiled/build.xml b/client-compiled/build.xml index d1f3eda674..1a78b17a7f 100644 --- a/client-compiled/build.xml +++ b/client-compiled/build.xml @@ -98,6 +98,9 @@
    + + + diff --git a/common.xml b/common.xml index ff82b6b7ec..7a3f2f17c6 100644 --- a/common.xml +++ b/common.xml @@ -27,9 +27,12 @@ + - + + + @@ -57,11 +60,20 @@ + + + + - + + + + + + @@ -110,7 +122,7 @@ - + @@ -132,7 +144,7 @@ - + @@ -157,7 +169,7 @@ - + @@ -261,6 +273,16 @@ + + + + + + + + + + @@ -321,7 +343,7 @@ - + diff --git a/uitest/build.xml b/uitest/build.xml index ee2b2c6124..53da0ae2e9 100644 --- a/uitest/build.xml +++ b/uitest/build.xml @@ -106,6 +106,10 @@ + + + + -- 2.39.5