diff options
Diffstat (limited to 'openstack')
| -rw-r--r-- | openstack/common/setup.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/openstack/common/setup.py b/openstack/common/setup.py index 2be72e6..48601ea 100644 --- a/openstack/common/setup.py +++ b/openstack/common/setup.py @@ -178,12 +178,16 @@ def _get_git_post_version(): def write_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)) + new_changelog = 'ChangeLog' + if not os.getenv('SKIP_WRITE_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(new_changelog, "w") as changelog_file: + changelog_file.write(canonicalize_emails(changelog, mailmap)) + else: + open(new_changelog, 'w').close() def generate_authors(): |
