feat: cut this repo over to apm-cli 0.39.3 pinned with uv (#271) #275

Merged
Defame1297 merged 14 commits from feat/271-uv-pinned-apm-cutover into main 2026-12-03 08:09:14 +00:00
Showing only changes of commit 0696ce31e7 - Show all commits
+9
View File
@@ -794,6 +794,8 @@ if ! command -v git > /dev/null 2>&1 \
echo " $SKIP_REASON"
else
PROBE="$(mktemp -d)"
UV_REAL_CACHE="${UV_CACHE_DIR:-$(uv cache dir 2> /dev/null || true)}"
UV_REAL_PYTHONS="${UV_PYTHON_INSTALL_DIR:-$(uv python dir 2> /dev/null || true)}"
trap 'rm -rf "$FAKE_BIN" "$WORK" "$TOOLS" "$UV_BIN" "$PIN_BIN" "$PATH_APM_BIN" "$PINNED" "$PROBE"' EXIT
UPSTREAM="$PROBE/upstream.git"
@@ -837,9 +839,16 @@ else
echo "deployments: []"
} > "$PROBE/consumer/apm.lock.yaml"
# env cannot run a shell function, so probe_apm is re-declared in a child bash.
# HOME moves to an empty dir, so uv's cache and its managed Pythons (both
# under HOME by default) are pinned to the real ones resolved before the
# move, and UV_OFFLINE forbids any fetch: the probe runs the already-synced
# pin and never needs the network.
(
cd "$PROBE/consumer" &&
env HOME="$PROBE/home" \
UV_CACHE_DIR="$UV_REAL_CACHE" \
UV_PYTHON_INSTALL_DIR="$UV_REAL_PYTHONS" \
UV_OFFLINE=1 \
GIT_CONFIG_GLOBAL="$PROBE/gitconfig" \
GIT_CONFIG_NOSYSTEM=1 \
GIT_TERMINAL_PROMPT=0 \