diff options
| author | Bhuvan Arumugam <bhuvan@apache.org> | 2012-04-12 09:05:11 -0700 |
|---|---|---|
| committer | Monty Taylor <mordred@inaugust.com> | 2012-04-12 09:14:26 -0700 |
| commit | 9e55abe2a8bdb09aff2fff0102f2a2dd4e99ebbc (patch) | |
| tree | 2d2848e433cafecd29101a12f198eff48fa5fda0 /openstack/common | |
| parent | 4acd7829ab0857356594dce3b841f4d785cf2aa1 (diff) | |
| download | oslo-9e55abe2a8bdb09aff2fff0102f2a2dd4e99ebbc.tar.gz oslo-9e55abe2a8bdb09aff2fff0102f2a2dd4e99ebbc.tar.xz oslo-9e55abe2a8bdb09aff2fff0102f2a2dd4e99ebbc.zip | |
Add AUTHORS generation function.
Change-Id: I0adbf0755a0191c7b68af9ca2f6e50c787ee7043
Diffstat (limited to 'openstack/common')
| -rw-r--r-- | openstack/common/setup.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/openstack/common/setup.py b/openstack/common/setup.py index 9eabfcc..4376102 100644 --- a/openstack/common/setup.py +++ b/openstack/common/setup.py @@ -118,10 +118,23 @@ version_info = { def write_git_changelog(): - """ Write a changelog based on the git changelog """ + """Write a changelog based on the git changelog""" if os.path.isdir('.git'): git_log_cmd = 'git log --stat' changelog = _run_shell_command(git_log_cmd) mailmap = parse_mailmap() with open("ChangeLog", "w") as changelog_file: changelog_file.write(canonicalize_emails(changelog, mailmap)) + + +def generate_authors(): + """Create AUTHORS file using git commits""" + jenkins_email = 'jenkins@review.openstack.org' + if os.path.isdir('.git'): + # don't include jenkins email address in AUTHORS file + git_log_cmd = "git log --format='%aN <%aE>' | sort -u | " \ + "grep -v " + jenkins_email + changelog = _run_shell_command(git_log_cmd) + mailmap = parse_mailmap() + with open("AUTHORS", "w") as authors_file: + authors_file.write(canonicalize_emails(changelog, mailmap)) |
