a661e439a0
Add the current frontend codebase with a baseline .gitignore and update piano-specific UI terms to teaching-oriented terms for the current product context. Made-with: Cursor
28 lines
507 B
Bash
Executable File
28 lines
507 B
Bash
Executable File
#!/bin/sh
|
|
set -x
|
|
|
|
git restore .
|
|
git fetch origin
|
|
git rebase origin/master
|
|
openresty_html_dir='/usr/local/openresty/nginx/html/music-room'
|
|
|
|
mkdir -p $openresty_html_dir
|
|
|
|
CUR_HOST=$(echo $HOSTNAME | cut -d "." -f 1)
|
|
|
|
if [[ "$CUR_HOST" != "moicen" ]]; then
|
|
echo "HOST ${CUR_HOST} is not moicen!"
|
|
exit 1
|
|
fi
|
|
|
|
rm -rf node_modules && pnpm install
|
|
npm run build:$CUR_HOST
|
|
|
|
sudo cp -r ./dist/* $openresty_html_dir
|
|
|
|
SERVER=${1:-1}
|
|
|
|
# upload to upyun
|
|
cd cdn
|
|
sh upload_assets.sh .${CUR_HOST}_upyun_pass $SERVER
|