From 8b82abb95327bc8a199136e74a7e6c2bf2577f0b Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 10 Apr 2012 18:29:25 -0700 Subject: [PATCH] Fix #3089 Build changelog.html for website --- Makefile | 4 ++++ doc/changelog-foot.html | 36 ++++++++++++++++++++++++++++++++++++ doc/changelog-head.html | 38 ++++++++++++++++++++++++++++++++++++++ tools/build-changelog.sh | 16 ++++++++++++++++ 4 files changed, 94 insertions(+) create mode 100644 doc/changelog-foot.html create mode 100644 doc/changelog-head.html create mode 100644 tools/build-changelog.sh diff --git a/Makefile b/Makefile index f7fd45638d..0eb46052d2 100644 --- a/Makefile +++ b/Makefile @@ -100,6 +100,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/ @@ -110,6 +111,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' > $@ diff --git a/doc/changelog-foot.html b/doc/changelog-foot.html new file mode 100644 index 0000000000..cc27eafb5e --- /dev/null +++ b/doc/changelog-foot.html @@ -0,0 +1,36 @@ + + + + + + + + + + + + + diff --git a/doc/changelog-head.html b/doc/changelog-head.html new file mode 100644 index 0000000000..7e78c61c60 --- /dev/null +++ b/doc/changelog-head.html @@ -0,0 +1,38 @@ + + + + + Node.js ChangeLog + + + + + +
+ + + +
+
+ + +
+
+

Node.js ChangeLog

+
+
+ +
diff --git a/tools/build-changelog.sh b/tools/build-changelog.sh new file mode 100644 index 0000000000..c6c219dae8 --- /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]+)|\ +# \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