Skip to content

Commit 7abbda8

Browse files
committed
Make rules for release blog post and email message
1 parent 6ebe9e0 commit 7abbda8

File tree

3 files changed

+37
-1
lines changed

3 files changed

+37
-1
lines changed

Makefile

+9-1
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,14 @@ uninstall:
3939
out/Release/node tools/installer.js uninstall
4040

4141
clean:
42-
-rm -rf out/Makefile node node_g out/$(BUILDTYPE)/node
42+
-rm -rf out/Makefile node node_g out/$(BUILDTYPE)/node blog.html email.md
4343
-find out/ -name '*.o' -o -name '*.a' | xargs rm -rf
4444

4545
distclean:
4646
-rm -rf out
4747
-rm -f config.gypi
4848
-rm -f config.mk
49+
-rm -rf node node_g blog.html email.md
4950

5051
test: all
5152
$(PYTHON) tools/test.py --mode=release simple message
@@ -136,6 +137,13 @@ out/doc/api/%.json: doc/api/%.markdown
136137
out/doc/api/%.html: doc/api/%.markdown
137138
out/Release/node tools/doc/generate.js --format=html --template=doc/template.html $< > $@
138139

140+
email.md: ChangeLog tools/email-footer.md
141+
bash tools/changelog-head.sh > $@
142+
cat tools/email-footer.md | sed -e 's|__VERSION__|'$(VERSION)'|g' >> $@
143+
144+
blog.html: email.md
145+
cat $< | node tools/doc/node_modules/.bin/marked > $@
146+
139147
website-upload: doc
140148
rsync -r out/doc/ [email protected]:~/web/nodejs.org/
141149

tools/changelog-head.sh

+15
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

+13
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)