- Clarify ARM64 build-on-remote approach for relay.orly.dev - Remove unnecessary git stash from deployment command - Add note about setcap needing reapplication after binary rebuild - Use explicit GOPATH and go binary path for clarity Files modified: - .claude/commands/release.md: Improved deployment step documentation - pkg/version/version: v0.48.13 -> v0.48.14 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.5 KiB
Release Command
Review all changes in the repository and create a release with proper commit message, version tag, and push to remotes.
Argument: $ARGUMENTS
The argument should be one of:
patch- Bump the patch version (e.g., v0.35.3 -> v0.35.4)minor- Bump the minor version and reset patch to 0 (e.g., v0.35.3 -> v0.36.0)
If no argument provided, default to patch.
Steps to perform:
-
Read the current version from
pkg/version/version -
Calculate the new version based on the argument:
- Parse the current version (format: vMAJOR.MINOR.PATCH)
- If
patch: increment PATCH by 1 - If
minor: increment MINOR by 1, set PATCH to 0
-
Update the version file (
pkg/version/version) with the new version -
Rebuild the embedded web UI by running:
./scripts/update-embedded-web.shThis ensures the latest web UI changes are included in the release.
-
Review changes using
git statusandgit diff --stat HEAD -
Compose a commit message following this format:
- First line: 72 chars max, imperative mood summary
- Blank line
- Bullet points describing each significant change
- "Files modified:" section listing affected files
- Footer with Claude Code attribution
-
Stage all changes with
git add -A -
Create the commit with the composed message
-
Create a git tag with the new version (e.g.,
v0.36.0) -
Push to remotes (origin, gitea, and git.mleku.dev) with tags:
git push origin main --tags git push gitea main --tags GIT_SSH_COMMAND="ssh -i ~/.ssh/gitmlekudev" git push ssh://mleku@git.mleku.dev:2222/mleku/next.orly.dev.git main --tags -
Deploy to relay.orly.dev (ARM64): Build on remote (faster than uploading cross-compiled binary due to slow local bandwidth):
ssh relay.orly.dev 'cd ~/src/next.orly.dev && git pull origin main && GOPATH=$HOME CGO_ENABLED=0 ~/go/bin/go build -o ~/.local/bin/next.orly.dev && sudo /usr/sbin/setcap cap_net_bind_service=+ep ~/.local/bin/next.orly.dev && sudo systemctl restart orly && ~/.local/bin/next.orly.dev version'Note: setcap must be re-applied after each binary rebuild to allow binding to ports 80/443.
-
Report completion with the new version and commit hash
Important:
- Do NOT push to github remote (only origin and gitea)
- Always verify the build compiles before committing:
CGO_ENABLED=0 go build -o /dev/null ./... - If build fails, fix issues before proceeding