Files
wehub-resource-sync d13100ebf3
Build and push docs image / build-image (push) Waiting to run
Update draft releases / main (push) Waiting to run
Test Python / test-python (macos-latest, 3.10) (push) Waiting to run
Test Python / test-python (macos-latest, 3.11) (push) Waiting to run
Test Python / test-python (ubuntu-latest, 3.10) (push) Waiting to run
Test Python / test-python (ubuntu-latest, 3.11) (push) Waiting to run
Build Web Application / build-web (macos-latest) (push) Waiting to run
Build Web Application / build-web (ubuntu-latest) (push) Waiting to run
Python Code Quality Checks / build (push) Waiting to run
chore: import upstream snapshot with attribution
2026-07-13 13:27:08 +08:00

39 lines
704 B
Bash
Executable File

#!/bin/bash
# Exit immediately if a command exits with a non-zero status.
set -e
SCRIPT_LOCATION=$0
cd "$(dirname "$SCRIPT_LOCATION")"
WORK_DIR=$(pwd)
WORK_DIR="$WORK_DIR/.."
TARGET_DIR="$WORK_DIR/packages/dbgpt-app/src/dbgpt_app/static/web"
echo "Building web static files"
echo "Target directory: $TARGET_DIR"
cd $WORK_DIR/web
source_env=".env"
tmp_env=".env.copy"
if [ -e "$source_env" ]; then
cp "$source_env" "$tmp_env"
rm -rf "$source_env"
else
echo "Do not find .env"
fi
yarn install
rm -rf ../web/out/
yarn compile
rm -rf $TARGET_DIR \
&& mkdir -p $TARGET_DIR \
&& cp -R ../web/out/* $TARGET_DIR
if [ -e "$tmp_env" ]; then
cp "$tmp_env" "$source_env"
rm -rf "$tmp_env"
fi