feat(scripts): add automated version bump script with optional push flag#235
Draft
Edison-A-N wants to merge 1 commit intoopenagents-org:developfrom
Draft
feat(scripts): add automated version bump script with optional push flag#235Edison-A-N wants to merge 1 commit intoopenagents-org:developfrom
Edison-A-N wants to merge 1 commit intoopenagents-org:developfrom
Conversation
|
@Edison-A-N is attempting to deploy a commit to the Raphael's projects Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Version Bump Script
📋 Summary
This PR introduces an automated version bumping script (
scripts/bump_version.py) to streamline the release workflow, replacing manual version updates inpyproject.tomlandsrc/openagents/__init__.py.✨ Features
Version Bump Types
The script supports all semantic versioning bump types:
majorminorpatchpostWhat the Script Does
pyproject.tomlpyproject.tomlandsrc/openagents/__init__.pyvX.Y.Z)--pushflag)🚀 Usage
Basic Usage (Local Only)
This creates a commit and tag locally without pushing to remote.
Push to Remote
This pushes the commit and tag to remote, ready for release.
🔒 Design Decisions
1.
--pushFlag as Safety GuardThe
--pushparameter is implemented as an opt-in safety feature:Current Design (with
--push):Alternative (without
--push):If the release process is exclusively managed by core maintainers, the
--pushflag can be removed to simplify the workflow. This would make the script always push by default, reducing command verbosity for trusted release managers.Recommendation: Keep the
--pushflag for now to provide flexibility and safety. It can be removed in a future iteration if the team prefers a simpler workflow.2. GitHub Release Creation
The current implementation does not automatically create GitHub Releases. Instead, it provides a URL for manual release creation.
Why not automated?
ghCLI toolHow to add GitHub Release automation:
If desired, add the following code to the script (after line 156, in the
if push:block) and installghCLI:Prerequisites:
This will automatically create a GitHub release with auto-generated release notes.
🔄 Future Enhancement: CI/CD Integration
Recommended: PyPI Publishing via GitHub Actions
To fully automate the release process, a GitHub Actions workflow can be added that triggers on new version tags (e.g.,
v*), builds the package, and publishes to PyPI automatically. This would enable:🧪 Testing
All version bump types have been tested:
post: 0.8.5.post2 → 0.8.5.post3patch: 0.8.5.post2 → 0.8.6minor: 0.8.5.post2 → 0.9.0major: 0.8.5.post2 → 1.0.0All test commits have been cleaned up and permanently removed from git history.
📝 Example Workflow
Option 1: Direct Push (Recommended for maintainers)
Option 2: Verify Before Push (Safer)
🔗 Reference
This script is inspired by mcpadapt's bump_version.py, adapted for OpenAgents' specific project structure and workflow.
🤔 Questions for Review
--pushflag for a simpler workflow?ghCLI)?Closes: N/A
Related: Release automation discussion