Skip to content

Commit

Permalink
chore(update/write-release-notes.sh): add html/head/body tags
Browse files Browse the repository at this point in the history
  • Loading branch information
lotem committed Mar 14, 2018
1 parent bc5d817 commit 4fd6a0c
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions update/write-release-notes.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
#!/bin/bash

# writes an HTML page for changes inr the latest release.
# writes an HTML page for changes in the latest release

cat <<EOF > release-notes.html
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
EOF

# take advantage of the fact that change log generator
# places 3 new lines after each chapter for a new release.

cat CHANGELOG.md | awk '{
print;
if ($0 == "") ++new_lines; else new_lines = 0;
if (new_lines >= 3) exit;
}' | marked --gfm > release-notes.html
}' | marked >> release-notes.html

cat <<EOF >> release-notes.html
</body>
</html>
EOF

0 comments on commit 4fd6a0c

Please sign in to comment.