mirror of
https://github.com/QingdaoU/OnlineJudgeFE.git
synced 2024-12-29 16:01:51 +00:00
23 lines
383 B
Bash
23 lines
383 B
Bash
#!/bin/sh
|
|
|
|
base=/OJ_FE
|
|
|
|
build_vendor_dll()
|
|
{
|
|
if [ ! -e "${base}/build/vendor-manifest.json" ]
|
|
then
|
|
npm run build:dll
|
|
fi
|
|
}
|
|
cd $base
|
|
npm install --registry=https://registry.npm.taobao.org && \
|
|
build_vendor_dll && \
|
|
npm run build
|
|
|
|
if [ $? -ne 0 ]; then
|
|
echo "Build error, please check node version and package.json"
|
|
exit 1
|
|
fi
|
|
|
|
exec nginx -c /OJ_FE/deploy/nginx.conf
|