Skip to content

Commit

Permalink
Release tweaks.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizzadar committed Jan 29, 2020
1 parent ce306c9 commit d35cd75
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions scripts/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -ex

echo "--> nuking dist/ & build/"
rm -rf dist/*
rm -f dist/.release_version_lock
rm -f dist/.spec
rm -rf build/*

echo "--> nuking anything in pyu-data/new"
Expand Down
12 changes: 7 additions & 5 deletions scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,17 @@ def _get_git_changes():


def _update_changelog(version, git_changes):
# Edit/create the changelog
with open('CHANGELOG.md', 'r') as f:
changelog_data = f.read()
new_changelog = f'# v{version}\n\nChanges:\n{git_changes}\n\n'
new_changelog = click.edit(new_changelog)

changelog_data = f'# v{version}\n\nChanges:\n{git_changes}\n\n{changelog_data}'
new_changelog = click.edit(changelog_data)
if not new_changelog:
raise click.BadParameter('Invalid changelog!')

with open('CHANGELOG.md', 'r') as f:
current_changelog = f.read()

new_changelog = f'{new_changelog}{current_changelog}'

with open('CHANGELOG.md', 'w') as f:
f.write(new_changelog)

Expand Down

0 comments on commit d35cd75

Please sign in to comment.