aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2011-04-27 00:56:08 -0400
committerJohn Resig <jeresig@gmail.com>2011-04-27 00:56:08 -0400
commitb5772da08748edbf22d3a6134b1764a787231e8b (patch)
treec1efd1896140fa72065210c10536d40964db791a
parenta8988e3cd13d1ffab4291ec9fcbd2f88b8e424a2 (diff)
downloadjquery-b5772da08748edbf22d3a6134b1764a787231e8b.tar.gz
jquery-b5772da08748edbf22d3a6134b1764a787231e8b.zip
Add a simple script for generating the release notes of a pre-release.
-rw-r--r--build/release-notes.js54
-rw-r--r--build/release-notes.txt27
2 files changed, 81 insertions, 0 deletions
diff --git a/build/release-notes.js b/build/release-notes.js
new file mode 100644
index 000000000..c81060a8d
--- /dev/null
+++ b/build/release-notes.js
@@ -0,0 +1,54 @@
+#!/usr/bin/env node
+/*
+ * jQuery Release Note Generator
+ */
+
+var fs = require("fs"),
+ http = require("http"),
+ tmpl = require("mustache"),
+ extract = /<a href="\/ticket\/(\d+)" title="View ticket">(.*?)<[^"]+"component">\s*(\S+)/g;
+
+var opts = {
+ version: "1.6 RC 1",
+ short_version: "1.6rc1",
+ final_version: "1.6",
+ categories: []
+};
+
+http.request({
+ host: "bugs.jquery.com",
+ port: 80,
+ method: "GET",
+ path: "/query?status=closed&resolution=fixed&component=!web&order=component&milestone=" + opts.final_version
+}, function (res) {
+ var data = [];
+
+ res.on( "data", function( chunk ) {
+ data.push( chunk );
+ });
+
+ res.on( "end", function() {
+ var match,
+ file = data.join(""),
+ cur;
+
+ while ( (match = extract.exec( file )) ) {
+ if ( "#" + match[1] !== match[2] ) {
+ var cat = match[3];
+
+ if ( !cur || cur.name !== cat ) {
+ cur = { name: match[3], niceName: match[3].replace(/^./, function(a){ return a.toUpperCase(); }), bugs: [] };
+ opts.categories.push( cur );
+ }
+
+ cur.bugs.push({ ticket: match[1], title: match[2] });
+ }
+ }
+
+ buildNotes();
+ });
+}).end();
+
+function buildNotes() {
+ console.log( tmpl.to_html( fs.readFileSync("release-notes.txt", "utf8"), opts ) );
+}
diff --git a/build/release-notes.txt b/build/release-notes.txt
new file mode 100644
index 000000000..1d0ae7460
--- /dev/null
+++ b/build/release-notes.txt
@@ -0,0 +1,27 @@
+<h2>jQuery {{version}} Released</h2>
+
+<p>This is a preview release of jQuery. We're releasing it so that everyone can start testing the code in their applications, making sure that there are no major problems.</p>
+
+<p>You can get the code from the jQuery CDN:</p>
+
+<ul>
+<li><a href="http://code.jquery.com/jquery-{{short_version}}.js">http://code.jquery.com/jquery-{{short_version}}.js</a></li>
+</ul>
+
+<p>You can help us by dropping that code into your existing application and letting us know that if anything no longer works. Please <a href="http://bugs.jquery.com/">file a bug</a> and be sure to mention that you're testing against jQuery {{version}}.</p>
+
+<p>We want to encourage everyone from the community to try and <a href="http://docs.jquery.com/Getting_Involved">get involved</a> in contributing back to jQuery core. We've set up a <a href="http://docs.jquery.com/Getting_Involved">full page</a> of information dedicated towards becoming more involved with the team. The team is here and ready to help you help us!</p>
+
+<h2>jQuery {{version}} Change Log</h2>
+
+<p>The current change log of the {{version}} release.</p>
+
+{{#categories}}
+<h3>{{niceName}}</h3>
+
+<ul>
+{{#bugs}}
+ <li><a href="http://bugs.jquery.com/ticket/{{ticket}}">#{{ticket}}</a>: {{title}}</li>
+{{/bugs}}
+</ul>
+{{/categories}}