diff options
author | W. Trevor King <wking@tremily.us> | 2012-10-25 22:40:49 -0400 |
---|---|---|
committer | W. Trevor King <wking@tremily.us> | 2012-10-25 22:44:15 -0400 |
commit | 1c5079bdbb762a98bb7cf2efda14d8a74ac65fb4 (patch) | |
tree | fb9c8c1e9f7baef777260f1abc5c7340ae305ba6 | |
parent | 2d16575f58adf3a48564cd6ecd112fd016dfe0ad (diff) | |
download | bugseverywhere-1c5079bdbb762a98bb7cf2efda14d8a74ac65fb4.tar.gz |
release.py: strip trailing whitespace from ChangeLog.
-rwxr-xr-x | release.py | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -18,6 +18,7 @@ # You should have received a copy of the GNU General Public License along with # Bugs Everywhere. If not, see <http://www.gnu.org/licenses/>. +import codecs import optparse import os import os.path @@ -103,9 +104,12 @@ def make_changelog(filename, tag): by hand is just too slow. """ print 'generate ChangeLog file', filename, 'up to tag', tag - invoke(['git', 'log', '--no-merges', - '%s..%s' % (INITIAL_COMMIT, tag)], - stdout=open(filename, 'w')), + status,stdout,stderr = invoke( + ['git', 'log', '--no-merges', '{}..{}'.format(INITIAL_COMMIT, tag)]) + with codecs.open(filename, 'w', 'utf-8') as f: + for line in stdout.splitlines(): + f.write(line.rstrip()) + f.write(u'\n') def set_vcs_name(be_dir, vcs_name='None'): """Exported directory is not a git repository, so set vcs_name to |