Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,34 @@ uv run ty check hindsight_api # Type check
3. Run tests to ensure nothing breaks
4. Submit a PR with a clear description of changes

## Release Process

The project uses `scripts/release.sh` for creating releases. This script automates the entire release workflow:

1. Bumps version in all components (API, clients, CLI, control plane, Helm)
2. **Regenerates OpenAPI spec and client SDKs** (Python, TypeScript, Rust)
3. Updates documentation versioning
4. Creates a commit and git tag
5. Pushes to GitHub (triggers CI/CD to publish packages)

### Usage

```bash
./scripts/release.sh <version>
```

**Example:**
```bash
./scripts/release.sh 0.5.0
```

### Important for Developers

- During development, version bumps in `__init__.py` do NOT require client regeneration
- Clients are only regenerated during releases
- Do not manually run `./scripts/generate-clients.sh` unless testing generation changes
- Client version comments will reflect the API version from the latest release

## Reporting Issues

Open an issue on GitHub with:
Expand Down
5 changes: 5 additions & 0 deletions hindsight-docs/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ const sidebars: SidebarsConfig = {
id: 'sdks/cli',
label: 'CLI',
},
{
type: 'doc',
id: 'sdks/embed',
label: 'Embedded SDK',
},
],
},
{
Expand Down
5 changes: 5 additions & 0 deletions hindsight-docs/versioned_sidebars/version-0.4-sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@
"type": "doc",
"id": "sdks/cli",
"label": "CLI"
},
{
"type": "doc",
"id": "sdks/embed",
"label": "Embedded SDK"
}
]
},
Expand Down
17 changes: 17 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,22 @@ else
print_warn "update-docs-version.sh not found, skipping docs update"
fi

# Regenerate OpenAPI spec and clients with new version
print_info "Regenerating OpenAPI spec and client SDKs..."
if ./scripts/generate-openapi.sh && ./scripts/generate-clients.sh; then
print_info "✓ OpenAPI spec and clients regenerated"
else
print_error "Failed to regenerate clients"
print_warn "You may need to fix this manually before committing"
read -p "Continue anyway? (y/n) " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
print_error "Release cancelled. Rolling back changes..."
git checkout .
exit 1
fi
fi

# Show changes
print_info "Changes to be committed:"
git diff
Expand All @@ -193,6 +209,7 @@ PATCH_VERSION=$(echo "$VERSION" | sed -E 's/^[0-9]+\.[0-9]+\.([0-9]+)$/\1/')
COMMIT_MSG="Release v$VERSION

- Update version to $VERSION in all components
- Regenerate OpenAPI spec and client SDKs
- Python packages: hindsight-api, hindsight-dev, hindsight-all, hindsight-litellm, hindsight-embed
- Python client: hindsight-clients/python
- TypeScript client: hindsight-clients/typescript
Expand Down
Loading