Visitar URL original
Export `UV_DEFAULT_INDEX` in `release.sh` (#27934) · astral-sh/ruff@4827bf7 · GitHub
Skip to content

Commit 4827bf7

Browse files
authored
Export UV_DEFAULT_INDEX in release.sh (#27934)
Summary -- Before this, running `./scripts/release.sh` produced this error on my machine: ```console ❯ ./scripts/release.sh Updating metadata with rooster... warning: `VIRTUAL_ENV=/Users/brw/.virtualenvs/openai` does not match the project environment path `.venv` and will be ig nored; use `--active` to target the active environment instead error: The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. hint: To update the lockfile, run `uv lock`. ``` Passing an additional `--default-index` flag to the initial `uv run` also works, but it seems easier to export the environment variable for the whole workflow. Test Plan -- Manual testing in today's release
1 parent d1087a4 commit 4827bf7

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎scripts/release.sh‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
set -eu
66

77
export UV_PREVIEW=1
8+
export UV_DEFAULT_INDEX='https://pypi.org/simple'
89

910
script_root="$(realpath "$(dirname "$0")")"
1011
project_root="$(dirname "$script_root")"
@@ -22,7 +23,7 @@ uv run --script "$project_root/scripts/generate-crate-readmes.py"
2223

2324
echo "Updating lockfiles..."
2425
cargo update -p ruff
25-
uv lock --default-index https://pypi.org/simple
26+
uv lock
2627

2728
echo "Checking crates.io publish setup..."
28-
uv run --default-index https://pypi.org/simple --script "$project_root/scripts/setup-crates-io-publish.py" --quiet
29+
uv run --script "$project_root/scripts/setup-crates-io-publish.py" --quiet

0 commit comments

Comments
 (0)