Skip to content

Commit

Permalink
Invoke changelog_head from outside the pushd
Browse files Browse the repository at this point in the history
so we know the relative path is right
  • Loading branch information
dbkr committed Dec 9, 2016
1 parent ebda89d commit 67e75fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,9 @@ if [ $dodist -eq 0 ]; then
# it's building
DIST_VERSION="$tag" npm run dist

`dirname $0`/scripts/changelog_head.py > latest_changes.md
popd

cat "${builddir}/CHANGELOG.md" | `dirname $0`/scripts/changelog_head.py > "${builddir}/latest_changes.md"
for i in "$builddir"/dist/*; do
assets="$assets -a $i"
if [ -n "$signing_id" ]
Expand Down
5 changes: 3 additions & 2 deletions scripts/changelog_head.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/usr/bin/env python

"""
Outputs the body of the first entry of changelog file CHANGELOG.md
Outputs the body of the first entry of changelog file on stdin
"""

import re
import sys

found_first_header = False
for line in open("CHANGELOG.md"):
for line in sys.stdin:
line = line.strip()
if re.match(r"^Changes in \[.*\]", line):
if found_first_header:
Expand Down

0 comments on commit 67e75fb

Please sign in to comment.