Skip to content

Commit 2fad63a

Browse files
obayclaude
andcommitted
docs: consolidate documentation and simplify README for end users
Consolidate all developer-focused documentation into CLAUDE.md: - Moved release process details from RELEASE.md - Integrated setup instructions from SETUP.md, SETUP_HOMEBREW.md, QUICK_START.md - Added comprehensive release checklist and troubleshooting - Included first-time release setup instructions Simplify README.md for end users: - Streamlined installation instructions - Removed verbose platform-specific steps - Updated all usage examples to not require --api-key flag - Emphasized config file as recommended authentication method - Made examples more concise and user-friendly Remove redundant documentation files: - INSTALL.md (details moved to README.md and CLAUDE.md) - RELEASE.md (moved to CLAUDE.md) - SETUP.md (moved to CLAUDE.md) - SETUP_HOMEBREW.md (moved to CLAUDE.md) - QUICK_START.md (moved to CLAUDE.md) This creates a clear separation: - README.md: User-facing, simple, get-started-quickly documentation - CLAUDE.md: Developer-facing, comprehensive, technical documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8ff223a commit 2fad63a

9 files changed

Lines changed: 236 additions & 985 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
## [0.1.0] - 2024-01-XX
1111

1212
### Added
13+
1314
- Initial release of HSCTL
1415
- List contacts with pagination support
1516
- List contact properties
@@ -24,4 +25,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2425

2526
[Unreleased]: https://github.com/obay/hsctl/compare/v0.1.0...HEAD
2627
[0.1.0]: https://github.com/obay/hsctl/releases/tag/v0.1.0
27-

CLAUDE.md

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,181 @@ All commands use `viper.GetString("api-key")` to retrieve the API key from any s
171171
When creating a HubSpot private app, ensure it has these scopes:
172172
- `crm.objects.contacts.read`
173173
- `crm.objects.contacts.write`
174+
175+
## Release Process
176+
177+
### Creating a New Release
178+
179+
The project uses GoReleaser with GitHub Actions for automated releases. Releases are triggered by pushing a git tag with the format `v*`.
180+
181+
#### Step 1: Prepare the Release
182+
183+
```bash
184+
# Ensure all changes are committed
185+
git add .
186+
git commit -m "chore: prepare release vX.Y.Z"
187+
git push origin main
188+
```
189+
190+
#### Step 2: Create and Push a Tag
191+
192+
Follow [Semantic Versioning](https://semver.org/):
193+
- **MAJOR** (v2.0.0): Breaking changes
194+
- **MINOR** (v1.1.0): New features (backward compatible)
195+
- **PATCH** (v1.0.1): Bug fixes (backward compatible)
196+
197+
```bash
198+
# Create annotated tag
199+
git tag -a v0.2.0 -m "Release v0.2.0 - Description of changes"
200+
201+
# Push tag to trigger release workflow
202+
git push origin v0.2.0
203+
```
204+
205+
#### Step 3: Automated Release Workflow
206+
207+
The `.github/workflows/release.yml` workflow will automatically:
208+
209+
1. **Build binaries** for all platforms:
210+
- Linux (amd64, arm64)
211+
- macOS/Darwin (amd64, arm64)
212+
- Windows (amd64)
213+
214+
2. **Create release artifacts**:
215+
- Versioned archives: `hsctl_v0.2.0_darwin_amd64.tar.gz`
216+
- Versionless archives: `hsctl_darwin_amd64.tar.gz` (for package managers)
217+
- Debian packages: `hsctl_linux_amd64.deb`
218+
- RPM packages: `hsctl_linux_amd64.rpm`
219+
- Windows ZIP: `hsctl_windows_amd64.zip`
220+
- Checksums file: `checksums.txt`
221+
222+
3. **Update package managers**:
223+
- Homebrew: Commits cask formula to `obay/homebrew-tap`
224+
- Scoop: Commits manifest to `obay/scoop-bucket`
225+
226+
4. **Create GitHub release** with:
227+
- Auto-generated changelog
228+
- All build artifacts attached
229+
- Release notes
230+
231+
#### Step 4: Verify the Release
232+
233+
1. Check GitHub Actions: https://github.com/obay/hsctl/actions
234+
2. Verify release page: https://github.com/obay/hsctl/releases/tag/v0.2.0
235+
3. Test installation via package managers:
236+
```bash
237+
# Homebrew (macOS)
238+
brew update && brew upgrade hsctl
239+
240+
# Scoop (Windows)
241+
scoop update && scoop update hsctl
242+
```
243+
244+
### Testing Releases Locally
245+
246+
Before pushing a tag, test the release process locally:
247+
248+
```bash
249+
# Install GoReleaser (if not already installed)
250+
brew install goreleaser/tap/goreleaser
251+
252+
# Test without publishing (dry run)
253+
goreleaser release --snapshot --skip-publish --clean
254+
255+
# Check generated artifacts in ./dist/
256+
ls -la dist/
257+
258+
# Verify generated package manager configs
259+
cat dist/*.rb # Homebrew formula
260+
cat dist/*.json # Scoop manifest
261+
```
262+
263+
### First-Time Release Setup
264+
265+
The first release automatically sets up package manager repositories:
266+
267+
#### Homebrew Tap Setup
268+
- **Repository**: `obay/homebrew-tap`
269+
- GoReleaser creates/updates: `Casks/hsctl.rb`
270+
- Users install with: `brew tap obay/homebrew-tap && brew install hsctl`
271+
- The cask includes an `unquarantine` hook for unsigned binaries
272+
273+
#### Scoop Bucket Setup
274+
- **Repository**: `obay/scoop-bucket`
275+
- GoReleaser creates/updates: `hsctl.json`
276+
- Users install with: `scoop bucket add obay https://github.com/obay/scoop-bucket && scoop install hsctl`
277+
278+
#### GitHub Token Requirements
279+
- The release workflow uses `HOMEBREW_TAP_TOKEN` secret
280+
- Token needs `repo` scope for both main repository and tap/bucket repositories
281+
- Set in: Repository Settings → Secrets and Variables → Actions
282+
283+
### Troubleshooting Releases
284+
285+
#### Release Workflow Fails
286+
1. Check GitHub Actions logs for errors
287+
2. Verify `HOMEBREW_TAP_TOKEN` is set and valid
288+
3. Ensure tag format matches `v*` pattern
289+
4. Verify Go version in workflow matches project requirements
290+
291+
#### Build Failures
292+
1. Test local build: `go build -o hsctl .`
293+
2. Check `.goreleaser.yml` configuration
294+
3. Verify all platforms are buildable: `GOOS=windows GOARCH=amd64 go build`
295+
296+
#### Package Manager Issues
297+
1. **Homebrew**: Check tap repository for committed formula
298+
2. **Scoop**: Verify bucket repository has updated manifest
299+
3. **Checksums**: Ensure checksums.txt is generated correctly
300+
301+
#### Binaries Don't Work on macOS
302+
- The homebrew cask includes an unquarantine hook
303+
- Users may need to run: `xattr -dr com.apple.quarantine /path/to/hsctl`
304+
- Consider code signing for future releases
305+
306+
### Release Checklist
307+
308+
Before creating a release:
309+
- [ ] All tests pass: `go test -v ./...`
310+
- [ ] Build succeeds: `go build -o hsctl .`
311+
- [ ] CHANGELOG.md is updated (if exists)
312+
- [ ] Version number follows semantic versioning
313+
- [ ] All changes are committed and pushed
314+
- [ ] Local GoReleaser test passes: `goreleaser release --snapshot --skip-publish --clean`
315+
316+
After creating a release:
317+
- [ ] GitHub Actions workflow completed successfully
318+
- [ ] Release appears on GitHub releases page
319+
- [ ] All artifacts are present (binaries, packages, checksums)
320+
- [ ] Homebrew tap is updated
321+
- [ ] Scoop bucket is updated
322+
- [ ] Installation via package managers works
323+
324+
## Installation for Development
325+
326+
### For Contributors
327+
328+
```bash
329+
# Clone the repository
330+
git clone https://github.com/obay/hsctl.git
331+
cd hsctl
332+
333+
# Install dependencies
334+
go mod download
335+
336+
# Build
337+
go build -o hsctl .
338+
339+
# Run tests
340+
go test -v ./...
341+
342+
# Install locally (optional)
343+
sudo mv hsctl /usr/local/bin/
344+
```
345+
346+
### For End Users
347+
348+
See the [README.md](README.md) for user-facing installation instructions via:
349+
- Homebrew (macOS)
350+
- Scoop (Windows)
351+
- Direct downloads for all platforms

0 commit comments

Comments
 (0)