diff --git a/Makefile b/Makefile index cd388aabf92..56cb631b052 100644 --- a/Makefile +++ b/Makefile @@ -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' > $@ diff --git a/doc/changelog-foot.html b/doc/changelog-foot.html new file mode 100644 index 00000000000..cc27eafb5ef --- /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 00000000000..7e78c61c602 --- /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 00000000000..c6c219dae82 --- /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