From 4827bf7cb449055e46fbfaf4b26e5125883a0569 Mon Sep 17 00:00:00 2001 From: Brent Westbrook <36778786+ntBre@users.noreply.github.com> Date: Thu, 20 Aug 2026 11:54:39 -0400 Subject: [PATCH] Export `UV_DEFAULT_INDEX` in `release.sh` (#27934) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- scripts/release.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/release.sh b/scripts/release.sh index 57ef6a1f9b..4614d4998c 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -5,6 +5,7 @@ set -eu export UV_PREVIEW=1 +export UV_DEFAULT_INDEX='https://pypi.org/simple' script_root="$(realpath "$(dirname "$0")")" project_root="$(dirname "$script_root")" @@ -22,7 +23,7 @@ uv run --script "$project_root/scripts/generate-crate-readmes.py" echo "Updating lockfiles..." cargo update -p ruff -uv lock --default-index https://pypi.org/simple +uv lock echo "Checking crates.io publish setup..." -uv run --default-index https://pypi.org/simple --script "$project_root/scripts/setup-crates-io-publish.py" --quiet +uv run --script "$project_root/scripts/setup-crates-io-publish.py" --quiet