- Enhanced Makefile with cross-compilation for linux/amd64, linux/arm64, darwin/arm64, windows/amd64, windows/arm64 - Added GitHub Actions CI workflow for testing on all platforms - Added GitHub Actions Release workflow triggered by version tags - Added VERSION file for version tracking - Added scripts/release.sh for automated release process - Added Dockerfile for containerized builds - Added CONTRIBUTING.md with release process documentation - Added CHANGELOG.md for version tracking - Updated .gitignore to exclude build artifacts - Fixed unused variable in cmd/obm/main.go - Version now injected via ldflags (main.version, main.gitCommit, main.buildTime)
2.7 KiB
2.7 KiB
Contributing to OpenBoatMobile CLI
Development Setup
Prerequisites
- Go 1.22 or later
- Make (optional, for using Makefile targets)
- Git
Getting Started
# Clone the repository
git clone https://github.com/openboatmobile/obm.git
cd obm
# Install dependencies
go mod download
# Build
make build
# Run tests
make test
# Run locally
./obm --help
Build Commands
# Quick build (current platform)
make build
# Run tests with race detection
make test
# Run linter
make lint
# Format code
make fmt
# Cross-compile all platforms
make cross-compile
# Prepare release artifacts
make prepare-release VERSION=0.2.0
Release Process
Releases are automated via GitHub Actions.
Creating a Release
-
Update VERSION file:
echo "0.2.0" > VERSION -
Run the release script (recommended):
./scripts/release.sh v0.2.0This will:
- Validate version format
- Run tests
- Update VERSION file
- Commit the version bump
- Create and push the tag
- Trigger GitHub Actions release workflow
-
Manual release (alternative):
# Update VERSION echo "0.2.0" > VERSION # Commit git add VERSION git commit -m "chore: release v0.2.0" # Tag git tag -a v0.2.0 -m "Release v0.2.0" # Push tag git push origin v0.2.0
What Happens When a Tag is Pushed?
GitHub Actions automatically:
- Builds binaries for all platforms (Linux amd64/arm64, macOS arm64, Windows amd64/arm64)
- Creates archives (.tar.gz for Unix, .zip for Windows)
- Generates SHA256 checksums
- Creates a GitHub Release with download links
Pre-release Versions
Versions with a hyphen (e.g., v1.0.0-beta.1) are marked as pre-release.
Architecture
cmd/obm/ - CLI entry point and command handlers
internal/
config/ - Configuration parsing and validation
deploy/ - Deployment wizard orchestration
destroy/ - Infrastructure teardown
inference/ - Inference provider client (ZAI, Venice, OpenRouter)
prompt/ - Interactive terminal prompts
provider/ - Cloud provider interfaces (Hetzner, DigitalOcean)
ssh/ - SSH client for remote execution
step/ - Deployment steps (Tailscale, Discord)
terraform/ - Terraform wrapper
validation/ - Configuration validation framework
Testing
- Run
make testfor full test suite with race detection - Run
make quick-testfor faster iteration (no race detection) - Run
make coverageto generate HTML coverage report
Pull Request Checklist
- Tests pass (
make test) - Code is formatted (
make fmt) - Vet passes (
make vet) - New code has tests
- Documentation updated if needed