Skip to content

Commit 832a4f6

Browse files
smamindlCopilotCopilotBrendanWalsh
authored
chore: Add version bump automation script (#2519)
* chore: Add version bump automation script Adds scripts/bump-version.py for safely updating version strings across the repo during releases. Uses word-boundary-aware regex to prevent partial matches (e.g., won't corrupt 1.0.115 when bumping 1.0.11). Features: - Dry-run mode to preview changes - Denylist for versioned_docs/, package.json, etc. - Regex safety verification before applying - Summary report of all changes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix: Preserve line endings when writing files Use read_bytes/write_bytes instead of read_text/write_text to avoid CRLF -> LF normalization that would create noisy diffs unrelated to the version bump. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * feat: context-anchored version bump with comprehensive test suite Redesigned version bump from bare regex to context-anchored substitution. Every replacement is proven SynapseML-related by surrounding text — safe for fully unattended automated releases. Features: - 20 context patterns (self/line/file-anchored) - Auto-detects current version from docusaurus.config.js - Enforces X.Y.Z format, version must increase - Two-pass: read all → validate → write all - Post-condition self-verification (re-reads files after write) - Broad sweep warns about old version in unscanned files - Runs docusaurus docs:version when website/docs/ exists - 175 tests: unit, integration, fuzz, adversarial, round-trip, snapshot regression, and 10 historical bump replays Usage: python scripts/bump-version.py --to 1.1.3 [--dry-run] Co-authored-by: smamindl <106691906+smamindl@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Brendan Walsh <brwals@microsoft.com>
1 parent 67d7cad commit 832a4f6

2 files changed

Lines changed: 1638 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)