summaryrefslogtreecommitdiff
path: root/tools/build-changelog.sh
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-04-10 18:29:25 -0700
committerisaacs <i@izs.me>2012-04-10 18:35:01 -0700
commite0660740d9e3cc7487aab46866b7a87f35128b73 (patch)
tree66ff7fabd6e1bd541c5d0f5a2d76f9cd2949d4e0 /tools/build-changelog.sh
parent3ba9519fafbbb765875db1ec4a5656d37cd34199 (diff)
downloadnode-e0660740d9e3cc7487aab46866b7a87f35128b73.tar.gz
Fix #3089 Build changelog.html for website
Diffstat (limited to 'tools/build-changelog.sh')
-rw-r--r--tools/build-changelog.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/build-changelog.sh b/tools/build-changelog.sh
new file mode 100644
index 000000000..c6c219dae
--- /dev/null
+++ b/tools/build-changelog.sh
@@ -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