2 Star 0 Fork 0

mirrors_OWASP/DVSA

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
dvsa.sh 1.57 KB
一键复制 编辑 原始数据 按行查看 历史
Tal Melamed 提交于 2023-06-15 04:27 +08:00 . deployment script
#!/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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_OWASP/DVSA.git
git@gitee.com:mirrors_OWASP/DVSA.git
mirrors_OWASP
DVSA
DVSA
master

搜索帮助