Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix #3089 Build changelog.html for website

  • Loading branch information...
commit e0660740d9e3cc7487aab46866b7a87f35128b73 1 parent 3ba9519
isaacs isaacs authored
4 Makefile
View
@@ -115,6 +115,7 @@ website_files = \
out/doc/about/index.html \
out/doc/community/index.html \
out/doc/logos/index.html \
+ out/doc/changelog.html \
$(doc_images)
doc: program $(apidoc_dirs) $(website_files) $(apiassets) $(apidocs) tools/doc/
@@ -125,6 +126,9 @@ $(apidoc_dirs):
out/doc/api/assets/%: doc/api_assets/% out/doc/api/assets/
cp $< $@
+out/doc/changelog.html: ChangeLog doc/changelog-head.html doc/changelog-foot.html tools/build-changelog.sh
+ bash tools/build-changelog.sh
+
out/doc/%.html: doc/%.html
cat $< | sed -e 's|__VERSION__|'$(VERSION)'|g' > $@
36 doc/changelog-foot.html
View
@@ -0,0 +1,36 @@
+ </div>
+ </div>
+ </div>
+ <div id="footer">
+ <ul class="clearfix">
+ <li><a href="/">Node.js</a></li>
+ <li><a href="/#download">Download</a></li>
+ <li><a href="/about/">About</a></li>
+ <li><a href="http://search.npmjs.org/">npm Registry</a></li>
+ <li><a href="http://nodejs.org/api/">Docs</a></li>
+ <li><a href="http://blog.nodejs.org">Blog</a></li>
+ <li><a href="/community/">Community</a></li>
+ <li><a href="/logos/">Logos</a></li>
+ <li><a href="http://jobs.nodejs.org/">Jobs</a></li>
+ <li><a href="http://twitter.com/nodejs" class="twitter">@nodejs</a></li>
+ </ul>
+
+ <p>Copyright <a href="http://joyent.com">Joyent, Inc</a>, Node.js is a <a href="/trademark-policy.pdf">trademark</a> of Joyent, Inc. View <a href="https://raw.github.com/joyent/node/__VERSION__/LICENSE">license</a>.</p>
+ </div>
+
+ <script src="sh_main.js"></script>
+ <script src="sh_javascript.min.js"></script>
+ <script>highlight(undefined, undefined, 'pre');</script>
+ <script>
+ var gaJsHost = (("https:" == document.location.protocol) ?
+ "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script>
+ <script>
+ try {
+ var pageTracker = _gat._getTracker("UA-10874194-2");
+ pageTracker._trackPageview();
+ } catch(err) {}</script>
+</body>
+</html>
+
38 doc/changelog-head.html
View
@@ -0,0 +1,38 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title>Node.js ChangeLog</title>
+ <link rel="stylesheet" href="api/assets/style.css">
+ <link rel="stylesheet" href="api/assets/sh.css">
+ <link rel="canonical" href="http://nodejs.org/changelog.html">
+</head>
+<body class="alt apidoc" id="api-section-changelog">
+ <div id="intro" class="interior">
+ <a href="/" title="Go back to the home page">
+ <img id="logo" src="http://nodejs.org/images/logo-light.png" alt="node.js">
+ </a>
+ </div>
+ <div id="content" class="clearfix">
+ <div id="column2" class="interior">
+ <ul>
+ <li><a href="/" class="home">Home</a></li>
+ <li><a href="/#download" class="download">Download</a></li>
+ <li><a href="/about/" class="about">About</a></li>
+ <li><a href="http://search.npmjs.org/" class="npm">npm Registry</a></li>
+ <li><a href="http://nodejs.org/api/" class="docs current">Docs</a></li>
+ <li><a href="http://blog.nodejs.org" class="blog">Blog</a></li>
+ <li><a href="/community/" class="community">Community</a></li>
+ <li><a href="/logos/" class="logos">Logos</a></li>
+ <li><a href="http://jobs.nodejs.org/" class="jobs">Jobs</a></li>
+ </ul>
+ <p class="twitter"><a href="http://twitter.com/nodejs">@nodejs</a></p>
+ </div>
+
+ <div id="column1" class="interior">
+ <header>
+ <h1>Node.js ChangeLog</h1>
+ <hr>
+ </header>
+
+ <div id="apicontent">
16 tools/build-changelog.sh
View
@@ -0,0 +1,16 @@
+#!/bin/bash
+cat ChangeLog \
+ | sed -E 's|([^/ ]+/[^#]+)#([0-9]+)|[\1#\2](https://github.com/\1/issues/\2)|g' \
+ | sed -E 's| #([0-9]+)| [#\1](https://github.com/joyent/node/issues/\1)|g' \
+ | sed -E 's|([0-9]+\.[0-9]+\.[0-9]+),? Version ([0-9]+\.[0-9]+\.[0-9]+)|<a id="v\2"></a>\
+# \1 Version \2|g' \
+ | sed -E 's|(,? ?)([0-9a-g]{6})[0-9a-g]{34}|\1[\2](https://github.com/joyent/node/commit/\2)|g' \
+ | ./node tools/doc/node_modules/.bin/marked > out/doc/changelog-body.html
+
+cat doc/changelog-head.html \
+ out/doc/changelog-body.html \
+ doc/changelog-foot.html \
+ | sed -E 's|__VERSION__|v'$(python tools/getnodeversion.py)'|g' \
+ > out/doc/changelog.html
+
+rm out/doc/changelog-body.html
Please sign in to comment.
Something went wrong with that request. Please try again.