-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Fix verison validation #49
Conversation
WalkthroughThis pull request focuses on streamlining the versioning workflow and script. The changes primarily involve modifying the GitHub Actions workflow file and the version bumping script. The workflow now directly pushes changes and tags to the main branch, removing the previous step of creating a temporary branch. The version in the VERSION file has been incremented from 2024.12.1 to 2024.12.2, and the bumping script has been updated to improve version format validation and simplify sequence number handling. Changes
Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🔭 Outside diff range comments (1)
versioning/bump_version.sh (1)
Line range hint
16-19
: Enhance version format validationThe current validation regex
^[0-9]{4}\.[0-9]{2}\.[0-9]{2}$
ensures basic format but doesn't validate ranges. Consider validating:
- Month range (01-12)
- Sequence range (01-99)
-if ! [[ "$CURRENT_VERSION" =~ ^[0-9]{4}\.[0-9]{2}\.[0-9]{2}$ ]]; then +# Validate format and ranges +if ! [[ "$CURRENT_VERSION" =~ ^[0-9]{4}\.(0[1-9]|1[0-2])\.(0[1-9]|[1-9][0-9])$ ]]; then echo "Error: Invalid version format in $VERSION_FILE" exit 1 fi
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/versioning.yml
(1 hunks)versioning/VERSION
(1 hunks)versioning/bump_version.sh
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- versioning/VERSION
🔇 Additional comments (1)
.github/workflows/versioning.yml (1)
Line range hint 36-42
: Verify branch protection rules and add validation steps
Direct pushes to the main branch could bypass branch protection rules. Consider:
- Adding a validation step before pushing
- Implementing explicit error handling for push failures
- Verifying that the version bump follows the expected format
Consider adding these safety measures:
- Version format validation step
- Explicit error handling for push failures
- Success/failure notifications
Summary by CodeRabbit
New Features
2024.12.2
.Bug Fixes
Chores