From e77e73cf64768845608ad25202cb97772fc7ab7b Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 15 Apr 2014 16:06:39 +0300 Subject: Update copyright year to 2014 Change-Id: Ic77338304dc7e58e49f27dcdaf0bab2e00f5bba6 --- .../src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java | 2 +- buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java | 2 +- buildhelpers/src/com/vaadin/buildhelpers/ManifestWriter.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'buildhelpers') diff --git a/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java b/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java index 5c3810099a..5274e0ac24 100644 --- a/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java +++ b/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java b/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java index 78ab0748ed..9dd51f8c6d 100644 --- a/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java +++ b/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of diff --git a/buildhelpers/src/com/vaadin/buildhelpers/ManifestWriter.java b/buildhelpers/src/com/vaadin/buildhelpers/ManifestWriter.java index 688af4b591..9e9b29c4a1 100644 --- a/buildhelpers/src/com/vaadin/buildhelpers/ManifestWriter.java +++ b/buildhelpers/src/com/vaadin/buildhelpers/ManifestWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 Vaadin Ltd. + * Copyright 2000-2014 Vaadin Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of @@ -156,4 +156,4 @@ public class ManifestWriter { public byte[] getBytes() { return buffer.toString().getBytes(); } -} \ No newline at end of file +} -- cgit v1.2.3 From e8f0fe7a5a7ca0d5605dfeb5bc774578019b65da Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 9 May 2014 20:49:51 +0300 Subject: Show badges in release notes (#13612) Change-Id: I6109cda80251b343999b75f51ffecf6a9bbbd6a2 --- WebContent/css/styles.css | 34 ++++++++++++++++++++++ WebContent/release-notes.html | 10 +++++-- .../buildhelpers/FetchReleaseNotesTickets.java | 18 ++++++++++-- 3 files changed, 56 insertions(+), 6 deletions(-) (limited to 'buildhelpers') diff --git a/WebContent/css/styles.css b/WebContent/css/styles.css index 9a5ddc74c1..9bd03ae8bc 100644 --- a/WebContent/css/styles.css +++ b/WebContent/css/styles.css @@ -439,3 +439,37 @@ img { margin: 0em 2em .8em 2em; float: right; } + +span.fv { + padding: 2px 10px; + margin-right: 5px; + color: rgb(71,174,67); + font-weight: bold; +} +td.fv { + background-color: rgb(206,247,205); + text-align: center; + border-radius: 3px; + font-size: 12px; + line-height: 1; + font-weight: bold; +} +td.bfp { + text-align: center; + color: rgb(37,114,146); + border-radius: 3px; + + padding: 2px 10px; + margin-right: 5px; + background-color: rgb(216,245,255); + font-size: 12px; + line-height: 1; + font-weight: bold; +} +.ticket { + text-align: right; + padding-left: 5px; +} +.pad { + padding-left: 5px; +} \ No newline at end of file diff --git a/WebContent/release-notes.html b/WebContent/release-notes.html index 5b9f15f06b..f912f9924e 100644 --- a/WebContent/release-notes.html +++ b/WebContent/release-notes.html @@ -80,9 +80,13 @@

This release includes the following closed issues:

- - + + @release-notes-tickets@ + + + +
 
VoteEnhancements Vaadin support users have voted for
PriorityDefects Vaadin support users have prioritized
+

You can also view the list diff --git a/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java b/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java index 4ca17443dc..6434c94352 100644 --- a/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java +++ b/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesTickets.java @@ -24,8 +24,12 @@ 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@
  • "; + 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 ticketTemplate = "" + + "@badge@" // + + "#@ticket@" // + + "@description@" // + + ""; // public static void main(String[] args) throws IOException { String version = System.getProperty("vaadin.version"); @@ -52,8 +56,16 @@ public class FetchReleaseNotesTickets { summary = summary.substring(1, summary.length() - 1); summary = summary.replace("\"\"", "\""); } + String badge = ""; + if (fields.length >= 8 && !fields[7].equals("")) { + badge = "Priority"; + } else if (fields.length >= 9 && fields[8].equalsIgnoreCase("true")) { + badge = "Vote"; + } + System.out.println(ticketTemplate.replace("@ticket@", fields[0]) - .replace("@description@", summary)); + .replace("@description@", summary) + .replace("@badge@", badge)); } urlStream.close(); } -- cgit v1.2.3 From e975af74a60b446551354182a3904604dae09278 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 9 May 2014 22:38:42 +0300 Subject: List authors in release notes (#13612) Change-Id: I51960e9345ff233e29289b33d3224e03d866d463 --- WebContent/release-notes.html | 6 ++ buildhelpers/build.xml | 9 ++ .../buildhelpers/FetchReleaseNotesAuthors.java | 101 +++++++++++++++++++++ .../com/vaadin/buildhelpers/authormap.properties | 6 ++ common.xml | 19 +++- 5 files changed, 138 insertions(+), 3 deletions(-) create mode 100644 buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesAuthors.java create mode 100644 buildhelpers/src/com/vaadin/buildhelpers/authormap.properties (limited to 'buildhelpers') diff --git a/WebContent/release-notes.html b/WebContent/release-notes.html index f912f9924e..2737ff3014 100644 --- a/WebContent/release-notes.html +++ b/WebContent/release-notes.html @@ -63,6 +63,7 @@ @version-minor@
  • Supported technologies
  • +
  • Authors
  • Vaadin on the Web
  • @@ -553,6 +554,11 @@
  • PostgreSQL
  • +

    Authors

    + Vaadin @version@ was created by: +
      + @release-notes-authors@ +

    Vaadin on the Web

      diff --git a/buildhelpers/build.xml b/buildhelpers/build.xml index 28eb55e6e8..159435811f 100644 --- a/buildhelpers/build.xml +++ b/buildhelpers/build.xml @@ -44,6 +44,15 @@ + + + + + + + + + WHAT? No JUnit tests for ${module.name}! diff --git a/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesAuthors.java b/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesAuthors.java new file mode 100644 index 0000000000..cd85ca6a3f --- /dev/null +++ b/buildhelpers/src/com/vaadin/buildhelpers/FetchReleaseNotesAuthors.java @@ -0,0 +1,101 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.buildhelpers; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Properties; + +public class FetchReleaseNotesAuthors { + private static final String template = "
    • @author@
    • "; + + public static void main(String[] args) throws IOException, + InterruptedException { + Properties authorMap = new Properties(); + + String authorsFilename = FetchReleaseNotesAuthors.class.getPackage() + .getName().replace(".", "/") + + "/authormap.properties"; + InputStream s = FetchReleaseNotesAuthors.class.getClassLoader() + .getResourceAsStream(authorsFilename); + if (s == null) { + System.err.println("Author mapping file " + authorsFilename + + " not found!"); + } + authorMap.load(s); + + String version = System.getProperty("vaadin.version"); + String previousVersion = getPreviousVersion(version); + // System.out.println("Using previous version: " + previousVersion); + // List all commits which are in this version but not in + // "previousVersion" + String cmd = "git log --pretty=%an HEAD ^origin/" + previousVersion; + Process p = Runtime.getRuntime().exec(cmd); + p.waitFor(); + if (p.exitValue() != 0) { + System.err.println("Exit code: " + p.exitValue()); + } + BufferedReader b = new BufferedReader(new InputStreamReader( + p.getInputStream())); + String line = ""; + + List authors = new ArrayList(); + while ((line = b.readLine()) != null) { + String author = line; + if (authorMap.containsKey(author)) { + author = authorMap.getProperty(author); + } + if (author != null && !author.equals("") + && !authors.contains(author)) { + authors.add(author); + } + } + Collections.sort(authors); + for (String author : authors) { + System.out.println(template.replace("@author@", author)); + } + } + + private static String getPreviousVersion(String version) { + String[] versionNumbers = version.split("\\."); + if (versionNumbers.length > 4 || versionNumbers.length < 3) { + throw new IllegalArgumentException("Cannot parse version: " + + version); + } + int major = Integer.parseInt(versionNumbers[0]); + int minor = Integer.parseInt(versionNumbers[1]); + int maintenance = Integer.parseInt(versionNumbers[2]); + // String qualifier = versionNumbers[3]; + + if (minor == 0) { + // Major release, can't know what the previous minor was + throw new IllegalArgumentException( + "Can't know what previous minor version was"); + } + if (maintenance == 0) { + // Minor release, use last minor + return major + "." + (minor - 1); + } else { + // Maintenance, use last maintenance + return major + "." + minor + "." + (maintenance - 1); + } + } +} diff --git a/buildhelpers/src/com/vaadin/buildhelpers/authormap.properties b/buildhelpers/src/com/vaadin/buildhelpers/authormap.properties new file mode 100644 index 0000000000..15b8ad2cba --- /dev/null +++ b/buildhelpers/src/com/vaadin/buildhelpers/authormap.properties @@ -0,0 +1,6 @@ +denisanisimov=Denis Anisimov +joheriks=Johannes Eriksson +michaelvogt=Michael Vogt +tapio=Tapio Aali +Build\ Agent= +mtzukanov=Michael Tzukanov \ No newline at end of file diff --git a/common.xml b/common.xml index 17537899de..6e28ab6a60 100644 --- a/common.xml +++ b/common.xml @@ -32,12 +32,14 @@ + - + + @@ -68,16 +70,27 @@ + + + - + - + + + + + + + + + -- cgit v1.2.3 From ee16285aee05e6d482f46e36ed60064b0ae1543a Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 9 May 2014 20:57:21 +0300 Subject: Support passing multiple versions Change-Id: I5aae200f8e49e1f9f53bbf53ceba1551854d013e --- .../buildhelpers/FetchReleaseNotesTickets.java | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'buildhelpers') 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(); -- cgit v1.2.3