# Contributing to OpenBoatMobile CLI ## Development Setup ### Prerequisites - Go 1.22 or later - Make (optional, for using Makefile targets) - Git ### Getting Started ```bash # 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 ```bash # 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 1. **Update VERSION file**: ```bash echo "0.2.0" > VERSION ``` 2. **Run the release script** (recommended): ```bash ./scripts/release.sh v0.2.0 ``` This will: - Validate version format - Run tests - Update VERSION file - Commit the version bump - Create and push the tag - Trigger GitHub Actions release workflow 3. **Manual release** (alternative): ```bash # 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: 1. Builds binaries for all platforms (Linux amd64/arm64, macOS arm64, Windows amd64/arm64) 2. Creates archives (.tar.gz for Unix, .zip for Windows) 3. Generates SHA256 checksums 4. 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 test` for full test suite with race detection - Run `make quick-test` for faster iteration (no race detection) - Run `make coverage` to 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