Skip to content

feat: add bump-version.sh script for OpenCode version updates - #4

Merged
tankdonut merged 1 commit into
mainfrom
feat/bump-version-script
Apr 19, 2026
Merged

feat: add bump-version.sh script for OpenCode version updates#4
tankdonut merged 1 commit into
mainfrom
feat/bump-version-script

Conversation

@tankdonut

Copy link
Copy Markdown
Owner

Summary

  • Add scripts/bump-version.sh — a CLI tool to bump the OpenCode version in build/.opencode-version and update corresponding SHA256 checksums in build/.opencode-checksums
  • Bumps OpenCode from v1.4.11 → v1.14.18 (checksums verified against GitHub Releases API)

Usage

# Bump to a specific version
./scripts/bump-version.sh 1.14.18

# Auto-detect latest release
./scripts/bump-version.sh --latest

# Preview changes without modifying files
./scripts/bump-version.sh --dry-run 1.14.18

# Show help
./scripts/bump-version.sh --help

What changed

  • New file: scripts/bump-version.sh (284 lines, executable)
    • Fetches release metadata from GitHub Releases API (no tarball downloads)
    • Validates semver format, strips v prefix, checks for both x64 + arm64 architectures
    • Atomic file writes via mktemp + mv to prevent inconsistent state
    • Follows repo conventions: [BUMP] prefix, validate.sh color scheme, build.sh arg parsing pattern
    • Prints suggested git add/git commit commands (does not auto-commit)
  • Updated: build/.opencode-version1.14.18
  • Updated: build/.opencode-checksums → v1.14.18 checksums (x64 + arm64)

Verification

All 4 final reviewers APPROVED:

Reviewer Verdict Details
Plan Compliance ✅ APPROVE 12/12 Must Have, 10/10 Must NOT Have
Code Quality ✅ APPROVE ShellCheck clean, conventions match
Manual QA ✅ APPROVE 10/10 scenarios pass (live GitHub API)
Scope Fidelity ✅ APPROVE No scope creep, spec-complete

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, v prefix 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
  • Same-version bump → exit 0, warning + idempotent checksum update
  • ./scripts/validate.sh passes after bump

- 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)
@tankdonut tankdonut self-assigned this Apr 19, 2026
@tankdonut
tankdonut merged commit e5b24d9 into main Apr 19, 2026
2 checks passed
@tankdonut
tankdonut deleted the feat/bump-version-script branch April 19, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant