1 Star 0 Fork 2.9K

智锋科技/dgiot_17

forked from dgiot开源社区/dgiot 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
init.sh 2.07 KB
一键复制 编辑 原始数据 按行查看 历史
dgiot 提交于 2022-04-21 15:09 . ci: Determine whether to use git page files
#!/usr/bin/env bash
flag=$1
cd ../dgiot-dashboard
git checkout master
git pull
# Judge whether there is a node_ Modules folder
if [ ! -d "node_modules" ]; then
echo "node_modules not found, install node_modules..."
pnpm install &> /dev/null
fi
# Judge whether dist directory is empty
if [ ! -d "dist" ]; then
echo "dist not found, build..."
pnpm build &> /dev/null
fi
cd ./dist/
# Judge apps /dgiot_ api/priv/www/dgiot_dgiot_dashboard Does the folder exist
if [ ! -d "../dgiot/apps/dgiot_api/priv/www/dgiot_dashboard" ]; then
echo "dgiot_dashboard not found, copy..."
wget https://dgiot-release-1306147891.cos.ap-nanjing.myqcloud.com/v4.4.0/dgiot_dashboard.tar.gz &> /dev/null
tar xf dgiot_dashboard.tar.gz &> /dev/null
fi
# Judge apps /dgiot_ api/priv/www/dgiot_file Does the folder exist
if [ ! -d "../dgiot/apps/dgiot_api/priv/www/dgiot_file" ]; then
echo "dgiot_file not found, copy..."
wget https://dgiot-release-1306147891.cos.ap-nanjing.myqcloud.com/v4.4.0/dgiot_file.tar.gz &> /dev/null
tar xf dgiot_file.tar.gz &> /dev/null
fi
# Judge apps /dgiot_api/priv/www/dgiot_dgiot_swagger Does the folder exist
if [ ! -d "../dgiot/apps/dgiot_api/priv/www/dgiot_swagger" ]; then
echo "dgiot_swagger not found, copy..."
wget https://dgiot-release-1306147891.cos.ap-nanjing.myqcloud.com/v4.4.0/dgiot_swagger.tar.gz &> /dev/null
tar xf dgiot_swagger.tar.gz &> /dev/null
fi
# Judge apps dgiot_swagger.tar.gz dgiot_file.tar.gz dgiot_dashboard.tar.gz Does the folder exist
if [ -f "dgiot_swagger.tar.gz" ]; then
rm -rf dgiot_swagger.tar.gz
fi
if [ -f "dgiot_file.tar.gz" ]; then
rm -rf dgiot_file.tar.gz
fi
if [ -f "dgiot_dashboard.tar.gz" ]; then
rm -rf dgiot_dashboard.tar.gz
fi
cd ../../dgiot
git checkout master
git pull
# Determine whether to use git page files
if [ -n "$flag" ] && [ "$flag" = "github" ]; then
echo "install git-page..."
wget https://github.com/dgiot/dgiot-dashboard/archive/refs/heads/gh-pages.zip
unzip gh-pages.zip
mv dgiot-dashboard-gh-pages/ www
fi
rm ./apps/dgiot_api/priv/www -rf
cp ../dgiot-dashboard/dist/ ./apps/dgiot_api/priv/www -rf
make run
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Erlang
1
https://gitee.com/elfbobo_admin/dgiot_17.git
git@gitee.com:elfbobo_admin/dgiot_17.git
elfbobo_admin
dgiot_17
dgiot_17
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385