fix(ci): use rm+mv in build_ui.sh so dest dir need not pre-exist

After removing litellm/proxy/_experimental/out/ from source control
(LIT-2815), a fresh CI checkout no longer contains that directory.
build_ui.sh used `cp -r ./out/* <dest>` which fails when <dest> does
not exist.

Replace with `rm -rf <dest> && mv ./out <dest>`, which works whether
or not the destination exists — identical to the approach already used
in the e2e_ui_testing CircleCI job (see config.yml comment).

https://claude.ai/code/session_01JVLLUH66aUXF9kxoHcYxWu
This commit is contained in:
Claude 2026-05-23 22:01:00 +00:00
parent 07f1cd6148
commit 40cab0a761
No known key found for this signature in database

View file

@ -49,13 +49,11 @@ if [ $? -eq 0 ]; then
# Specify the destination directory
destination_dir="../../litellm/proxy/_experimental/out"
# Remove existing files in the destination directory
rm -rf "$destination_dir"/*
# Copy the contents of the output directory to the specified destination
cp -r ./out/* "$destination_dir"
rm -rf ./out
# Replace destination atomically so it works whether or not the directory
# previously existed (rm+mv avoids the cp-as-child issue when the dest dir
# is pre-existing, and avoids "no such file" when it does not exist).
rm -rf "$destination_dir"
mv ./out "$destination_dir"
echo "Deployment completed."
else