Permalink
Browse files

Invoke changelog_head from outside the pushd

so we know the relative path is right
  • Loading branch information...
1 parent ebda89d commit 67e75fb7af6677812f042c4a0b6866ef26c1f4b7 @dbkr dbkr committed Dec 9, 2016
Showing with 5 additions and 3 deletions.
  1. +2 −1 release.sh
  2. +3 −2 scripts/changelog_head.py
View
@@ -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" ]
@@ -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:

0 comments on commit 67e75fb

Please sign in to comment.