mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-12 12:06:04 +00:00
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.
This commit is contained in:
parent
83176acd88
commit
451f1e5fd2
3 changed files with 48 additions and 27 deletions
|
|
@ -78,7 +78,7 @@ repos:
|
|||
name: uv-lock
|
||||
additional_dependencies:
|
||||
- uv==0.7.20
|
||||
entry: ./scripts/pre-commit-uv-lock.sh
|
||||
entry: ./scripts/uv-run-with-index.sh lock
|
||||
language: python
|
||||
pass_filenames: false
|
||||
require_serial: true
|
||||
|
|
@ -87,7 +87,7 @@ repos:
|
|||
name: Distribution Template Codegen
|
||||
additional_dependencies:
|
||||
- uv==0.7.8
|
||||
entry: uv run --group codegen ./scripts/distro_codegen.py
|
||||
entry: ./scripts/uv-run-with-index.sh run --group codegen ./scripts/distro_codegen.py
|
||||
language: python
|
||||
pass_filenames: false
|
||||
require_serial: true
|
||||
|
|
@ -96,7 +96,7 @@ repos:
|
|||
name: Provider Codegen
|
||||
additional_dependencies:
|
||||
- uv==0.7.8
|
||||
entry: uv run --group codegen ./scripts/provider_codegen.py
|
||||
entry: ./scripts/uv-run-with-index.sh run --group codegen ./scripts/provider_codegen.py
|
||||
language: python
|
||||
pass_filenames: false
|
||||
require_serial: true
|
||||
|
|
@ -105,7 +105,7 @@ repos:
|
|||
name: API Spec Codegen
|
||||
additional_dependencies:
|
||||
- uv==0.7.8
|
||||
entry: sh -c 'uv run ./docs/openapi_generator/run_openapi_generator.sh > /dev/null'
|
||||
entry: sh -c './scripts/uv-run-with-index.sh run ./docs/openapi_generator/run_openapi_generator.sh > /dev/null'
|
||||
language: python
|
||||
pass_filenames: false
|
||||
require_serial: true
|
||||
|
|
@ -146,7 +146,7 @@ repos:
|
|||
name: Generate CI documentation
|
||||
additional_dependencies:
|
||||
- uv==0.7.8
|
||||
entry: uv run ./scripts/gen-ci-docs.py
|
||||
entry: ./scripts/uv-run-with-index.sh run ./scripts/gen-ci-docs.py
|
||||
language: python
|
||||
pass_filenames: false
|
||||
require_serial: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue