Skip to content

Commit

Permalink
feat: .env should not build to static asset
Browse files Browse the repository at this point in the history
  • Loading branch information
Aralhi committed Jan 3, 2024
1 parent 7860dff commit 8ef2104
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion scripts/build_web_static.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,24 @@ WORK_DIR="$WORK_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

npm install
npm run build

rm -rf ../dbgpt/app/static/*

cp -R ../web/out/* ../dbgpt/app/static
cp -R ../web/out/* ../dbgpt/app/static

if [ -e "$tmp_env" ]; then
cp "$tmp_env" "$source_env"
rm -rf "$tmp_env"
fi

0 comments on commit 8ef2104

Please sign in to comment.