23 lines
383 B
Bash
Raw Permalink Normal View History

2017-10-24 21:16:00 +08:00
#!/bin/sh
2017-11-13 21:28:21 +08:00
base=/OJ_FE
2017-10-24 21:16:00 +08:00
build_vendor_dll()
{
if [ ! -e "${base}/build/vendor-manifest.json" ]
then
npm run build:dll
fi
2017-10-24 21:16:00 +08:00
}
cd $base
npm install --registry=https://registry.npm.taobao.org && \
build_vendor_dll && \
npm run build
2017-10-24 21:16:00 +08:00
if [ $? -ne 0 ]; then
echo "Build error, please check node version and package.json"
exit 1
fi
2017-10-24 21:16:00 +08:00
exec nginx -c /OJ_FE/deploy/nginx.conf