Skip to content

Commit

Permalink
fix command order
Browse files Browse the repository at this point in the history
  • Loading branch information
sasa-tomic committed Apr 3, 2024
1 parent 419be18 commit f3d6ea9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bin/mk-release.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ def update_change_log(current_version, new_version):
subprocess.check_call(["poetry", "run", "git-changelog", "--filter-commits", current_version + "..", "--in-place", "--output", "CHANGELOG.md", "--bump", new_version])
# Add the CHANGELOG.md to the commit
subprocess.check_call(["git", "add", "CHANGELOG.md"])
# Commit the changes
subprocess.check_call(["git", "commit", "-m", f"Release {new_version}"])
# Push the new branch
subprocess.check_call(["git", "push", "origin", "--force", f"release-{new_version}"])


def main():
Expand All @@ -88,10 +84,14 @@ def main():
subprocess.check_call(["git", "checkout", "main"])
subprocess.check_call(["git", "pull"])
# Create a new branch for the release
subprocess.check_call(["git", "checkout", "-b", f"release-{args.new_version}"])
patch_file("Cargo.toml", r'^version = "[\d\.]+"', f'version = "{args.new_version}"')
patch_file("VERSION", f"^{current_version}$", args.new_version)
update_change_log(current_version, args.new_version)
subprocess.check_call(["git", "checkout", "-b", f"release-{args.new_version}"])
# Commit the changes
subprocess.check_call(["git", "commit", "-m", f"Release {new_version}"])
# Push the new branch
subprocess.check_call(["git", "push", "origin", "--force", f"release-{new_version}"])


if __name__ == "__main__":
Expand Down

0 comments on commit f3d6ea9

Please sign in to comment.