summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2013-06-23 20:08:28 -0400
committerMonty Taylor <mordred@inaugust.com>2013-07-11 22:41:12 -0400
commit04b4933575cf8f90f77855fcf8ba6447ff94cf60 (patch)
tree37291b9d06fa65a63fcbc55abc27d56f2d03abc9
parent746b78d637724b369477270f518aa09768c5124e (diff)
downloadpbr-04b4933575cf8f90f77855fcf8ba6447ff94cf60.tar.gz
Put AUTHORS.in at the top of AUTHORS.
swift has an AUTHORS file that puts a header at the top of the file with some extra information, then lists the contributors. If we put AUTHORS.in at the top of the generated file, then we can put their boilerplate into AUTHORS.in and the resulting file should look the same. Change-Id: I2caa4e606dd1199f49c925dccc64d492848ac580
-rw-r--r--pbr/packaging.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pbr/packaging.py b/pbr/packaging.py
index 815f060..ab35cb7 100644
--- a/pbr/packaging.py
+++ b/pbr/packaging.py
@@ -264,7 +264,7 @@ def generate_authors(git_dir=None, dest_dir='.', option_dict=dict()):
if not should_skip:
old_authors = os.path.join(dest_dir, 'AUTHORS.in')
new_authors = os.path.join(dest_dir, 'AUTHORS')
- # If there's already a ChangeLog and it's not writable, just use it
+ # If there's already an AUTHORS file and it's not writable, just use it
if (os.path.exists(new_authors)
and not os.access(new_authors, os.W_OK)):
return
@@ -289,11 +289,11 @@ def generate_authors(git_dir=None, dest_dir='.', option_dict=dict()):
mailmap = read_git_mailmap(git_dir)
with open(new_authors, 'wb') as new_authors_fh:
- new_authors_fh.write(canonicalize_emails(
- changelog, mailmap).encode('utf-8'))
if os.path.exists(old_authors):
with open(old_authors, "rb") as old_authors_fh:
- new_authors_fh.write(b'\n' + old_authors_fh.read())
+ new_authors_fh.write(old_authors_fh.read())
+ new_authors_fh.write(canonicalize_emails(
+ changelog, mailmap).encode('utf-8'))
_rst_template = """%(heading)s