Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update release and bump patch versioning flow #4286

Merged
merged 4 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 13 additions & 5 deletions release/bump_patch_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@

# DeepSpeed Team

import argparse
from packaging import version as pkg_version

with open('../version.txt') as fd:
version = pkg_version.parse(fd.read())
parser = argparse.ArgumentParser()

with open('../version.txt', 'w') as fd:
fd.write(f'{version.major}.{version.minor}.{version.micro + 1}\n')
parser.add_argument("--current_version",
type=str,
help="The current version being published to help set the next version.")

print(f'{version} -> {version.major}.{version.minor}.{version.micro + 1}')
args = parser.parse_args()

current_version = pkg_version.parse(args.current_version)

with open('./version.txt', 'w') as fd:
fd.write(f'{current_version.major}.{current_version.minor}.{current_version.micro + 1}\n')

print(f'{current_version} -> {current_version.major}.{current_version.minor}.{current_version.micro + 1}')
3 changes: 1 addition & 2 deletions release/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,4 @@ git tag v${version}
git push origin v${version}

echo "bumping up patch version"
cd -
python bump_patch_version.py
python release/bump_patch_version.py --current_version ${version}