代码拉取完成,页面将自动刷新
#!/bin/bash
PYHTON_VER=$(python -c 'import sys; print(sys.version_info.major)')
if [ $PYHTON_VER -ne 3 ]; then
PY_CMD=python3
else
PY_CMD=python
fi
case $1 in
package-template)
echo "[-] Will execute SAM with default commands. To modify, update file: scripts/package_template.py"
$PY_CMD scripts/package_template.py "${@:2}"
;;
client-connect)
$PY_CMD scripts/client_connect.py "${@:2}"
;;
client-build)
BE_STACK=client/src/be-stack.json
if [ ! -f "$BE_STACK" ]; then
echo "[X] Could not identify $BE_STACK."
echo "If you already deployed a backend, please first run: $ ./dvsa.sh client-connect"
exit 0
fi
npm i
npm run-script client:build
clear
if grep -rnq "<UserPoolClientId>" $BE_STACK
then
echo "[X] Your client file is not connected to your backend."
echo "If you already deployed the client run: $ ./dvsa.sh client-connect"
exit 0
else
DIST_FOLDER=backend/deployment/dist_s3
echo "[-] Copying new client to $DIST_FOLDER"
if [ -d "$DIST_FOLDER" ]; then
rm -rf $DIST_FOLDER
fi
mkdir $DIST_FOLDER
cp -r client/dist/* $DIST_FOLDER
echo "All done! You can now run update-client to update the website."
fi
;;
client-update)
$PY_CMD scripts/client_update.py "${@:2}"
;;
client-start)
npm run-script client:start
;;
*)
echo "[X] Unknown command."
echo "Options are: package|connect|update. See github.com/owas/dvsa for more information."
exit 0
;;
esac
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。