Skip to content

Commit 08e2e57

Browse files
committed
Make rules for release blog post and email message
1 parent 57d7220 commit 08e2e57

File tree

3 files changed

+36
-1
lines changed

3 files changed

+36
-1
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,12 @@ out/doc/api/%.json: doc/api/%.markdown
122122
out/doc/api/%.html: doc/api/%.markdown
123123
out/Release/node tools/doc/generate.js --format=html --template=doc/template.html $< > $@
124124

125-
out/doc/%:
125+
email.md: ChangeLog tools/email-footer.md
126+
bash tools/changelog-head.sh > $@
127+
cat tools/email-footer.md | sed -e 's|__VERSION__|'$(VERSION)'|g' >> $@
128+
129+
blog.html: email.md
130+
cat $< | node tools/doc/node_modules/.bin/marked > $@
126131

127132
website-upload: doc
128133
rsync -r out/doc/ [email protected]:~/web/nodejs.org/
@@ -143,11 +148,13 @@ docclean:
143148
clean:
144149
$(WAF) clean
145150
-find tools -name "*.pyc" | xargs rm -f
151+
-rm -rf blog.html email.md
146152

147153
distclean: docclean
148154
-find tools -name "*.pyc" | xargs rm -f
149155
-rm -rf dist-osx
150156
-rm -rf out/ node node_g
157+
-rm -rf blog.html email.md
151158

152159
check:
153160
@tools/waf-light check

tools/changelog-head.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
cat ChangeLog | {
3+
s=-1
4+
while read line; do
5+
if [ "${line:0:1}" == "2" ]; then
6+
let "++s"
7+
fi
8+
if [ $s -eq 1 ]; then
9+
exit
10+
else
11+
echo "$line"
12+
fi
13+
done
14+
}
15+

tools/email-footer.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Source Code: http://nodejs.org/dist/__VERSION__/node-__VERSION__.tar.gz
2+
3+
Windows Installer: http://nodejs.org/dist/__VERSION__/node-__VERSION__.msi
4+
5+
Windows x64 Files: http://nodejs.org/dist/__VERSION__/x64/
6+
7+
Macintosh Installer (Universal): http://nodejs.org/dist/__VERSION__/node-__VERSION__.pkg
8+
9+
Other release files: http://nodejs.org/dist/__VERSION__/
10+
11+
Website: http://nodejs.org/docs/__VERSION__/
12+
13+
Documentation: http://nodejs.org/docs/__VERSION__/api/

0 commit comments

Comments
 (0)