From 08e2e570a7dfb8f89b9731cb04dda5d63882be52 Mon Sep 17 00:00:00 2001 From: isaacs Date: Thu, 29 Mar 2012 16:01:27 -0700 Subject: [PATCH] Make rules for release blog post and email message --- Makefile | 9 ++++++++- tools/changelog-head.sh | 15 +++++++++++++++ tools/email-footer.md | 13 +++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 tools/changelog-head.sh create mode 100644 tools/email-footer.md diff --git a/Makefile b/Makefile index 737f49ae5a9..1cb860f560d 100644 --- a/Makefile +++ b/Makefile @@ -122,7 +122,12 @@ out/doc/api/%.json: doc/api/%.markdown out/doc/api/%.html: doc/api/%.markdown out/Release/node tools/doc/generate.js --format=html --template=doc/template.html $< > $@ -out/doc/%: +email.md: ChangeLog tools/email-footer.md + bash tools/changelog-head.sh > $@ + cat tools/email-footer.md | sed -e 's|__VERSION__|'$(VERSION)'|g' >> $@ + +blog.html: email.md + cat $< | node tools/doc/node_modules/.bin/marked > $@ website-upload: doc rsync -r out/doc/ node@nodejs.org:~/web/nodejs.org/ @@ -143,11 +148,13 @@ docclean: clean: $(WAF) clean -find tools -name "*.pyc" | xargs rm -f + -rm -rf blog.html email.md distclean: docclean -find tools -name "*.pyc" | xargs rm -f -rm -rf dist-osx -rm -rf out/ node node_g + -rm -rf blog.html email.md check: @tools/waf-light check diff --git a/tools/changelog-head.sh b/tools/changelog-head.sh new file mode 100644 index 00000000000..e0cec166385 --- /dev/null +++ b/tools/changelog-head.sh @@ -0,0 +1,15 @@ +#!/bin/bash +cat ChangeLog | { + s=-1 + while read line; do + if [ "${line:0:1}" == "2" ]; then + let "++s" + fi + if [ $s -eq 1 ]; then + exit + else + echo "$line" + fi + done +} + diff --git a/tools/email-footer.md b/tools/email-footer.md new file mode 100644 index 00000000000..0d96b45c5ac --- /dev/null +++ b/tools/email-footer.md @@ -0,0 +1,13 @@ +Source Code: http://nodejs.org/dist/__VERSION__/node-__VERSION__.tar.gz + +Windows Installer: http://nodejs.org/dist/__VERSION__/node-__VERSION__.msi + +Windows x64 Files: http://nodejs.org/dist/__VERSION__/x64/ + +Macintosh Installer (Universal): http://nodejs.org/dist/__VERSION__/node-__VERSION__.pkg + +Other release files: http://nodejs.org/dist/__VERSION__/ + +Website: http://nodejs.org/docs/__VERSION__/ + +Documentation: http://nodejs.org/docs/__VERSION__/api/