feat: add bump-version.sh script for OpenCode version updates - #4
Merged
Conversation
- Add scripts/bump-version.sh: CLI tool to bump OpenCode version and checksums - Supports explicit version (./scripts/bump-version.sh 1.14.18), --latest, --dry-run - Fetches SHA256 checksums from GitHub Releases API (linux-x64 + linux-arm64) - Atomic file writes, semver validation, v-prefix stripping, dependency checks - Follows repo conventions: [BUMP] prefix, validate.sh colors, build.sh arg parsing - Update OpenCode from v1.4.11 to v1.14.18 (checksums verified)
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.
Summary
scripts/bump-version.sh— a CLI tool to bump the OpenCode version inbuild/.opencode-versionand update corresponding SHA256 checksums inbuild/.opencode-checksumsUsage
What changed
scripts/bump-version.sh(284 lines, executable)vprefix, checks for both x64 + arm64 architecturesmktemp+mvto prevent inconsistent state[BUMP]prefix,validate.shcolor scheme,build.sharg parsing patterngit add/git commitcommands (does not auto-commit)build/.opencode-version→1.14.18build/.opencode-checksums→ v1.14.18 checksums (x64 + arm64)Verification
All 4 final reviewers APPROVED:
Pre-commit hooks passed:
shellcheck✓, trailing whitespace ✓, end-of-file ✓Test plan
./scripts/bump-version.sh --help→ exit 0, usage printed./scripts/bump-version.sh 1.14.18→ exit 0, files updated correctly./scripts/bump-version.sh --latest→ exit 0, latest version detected./scripts/bump-version.sh --dry-run 1.14.18→ exit 0, files unchanged./scripts/bump-version.sh v1.14.18→ exit 0,vprefix stripped./scripts/bump-version.sh 99.99.99→ exit 1, release not found./scripts/bump-version.sh "not-a-version"→ exit 1, semver error./scripts/bump-version.sh(no args) → exit 1, missing version error./scripts/validate.shpasses after bump