mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-01 02:02:20 +00:00
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:
parent
07f1cd6148
commit
40cab0a761
1 changed files with 5 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue