Commit graph

3 commits

Author SHA1 Message Date
Ashwin Bharambe
63714b6432 refactor: reduce verbose logging in uv-run-with-index wrapper 2025-10-31 11:27:41 -07:00
Ashwin Bharambe
1c557b87cb fix: detect branch from GitHub Actions env vars in wrapper
In CI, git is in detached HEAD state, so git rev-parse returns 'HEAD'.
Use GITHUB_REF and GITHUB_BASE_REF to properly detect release branches
in GitHub Actions workflows.

This ensures pre-commit hooks in CI can correctly identify when running
against release branches and set the appropriate UV index URLs.
2025-10-31 09:39:11 -07:00
Ashwin Bharambe
451f1e5fd2 refactor: smart UV index wrapper for all pre-commit hooks
Replace isolated UV configuration with unified wrapper script that:
- Detects release branches (release-X.Y.x pattern)
- Checks upstream target branch for feature branches
- Supports LLAMA_STACK_RELEASE_MODE env var for local testing
- Wraps all uv commands (lock, run) in local hooks

When on/targeting release branches, automatically sets:
- UV_EXTRA_INDEX_URL=https://test.pypi.org/simple/
- UV_INDEX_STRATEGY=unsafe-best-match

For local testing on feature branches targeting release branches:
  LLAMA_STACK_RELEASE_MODE=true pre-commit run --all-files

This ensures RC versions can be resolved from test.pypi in both
CI (on actual release branches) and local development.
2025-10-31 08:14:20 -07:00