2023-12-19 17:10:25 +00:00
|
|
|
import os
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
# Bump version
|
2023-12-19 17:24:27 +00:00
|
|
|
print('Bumping version...')
|
2023-12-19 17:10:25 +00:00
|
|
|
subprocess.check_call(['bumpversion', 'patch'])
|
|
|
|
|
|
|
|
# Push changes to remote
|
2023-12-19 17:24:27 +00:00
|
|
|
print('Pushing changes to remote...')
|
2023-12-19 17:10:25 +00:00
|
|
|
subprocess.check_call(['git', 'push'])
|
|
|
|
subprocess.check_call(['git', 'push', '--tags'])
|
|
|
|
|
|
|
|
# Run towncrier
|
2023-12-19 17:24:27 +00:00
|
|
|
print('Running towncrier...')
|
2023-12-19 17:22:32 +00:00
|
|
|
subprocess.check_call(['towncrier', '--yes'])
|
|
|
|
|
2023-12-19 17:24:27 +00:00
|
|
|
print("Created newsfragments directory")
|
2023-12-19 17:22:32 +00:00
|
|
|
if not os.path.isdir('./newsfragments'):
|
2023-12-19 17:24:27 +00:00
|
|
|
os.mkdir('./newsfragments')
|
|
|
|
|
|
|
|
print("Done!")
|