|
|
#!/bin/bash
|
|
|
|
|
|
#输出当前时间
|
|
|
date --date='0 days ago' "+%Y-%m-%d %H:%M:%S"
|
|
|
|
|
|
#web站点存放路径
|
|
|
webPath="/www/wwwroot/"
|
|
|
projectName="globalso-v6-c-customer"
|
|
|
|
|
|
#git项目
|
|
|
gitHttp="http://47.244.231.31:8099/zhl/globalso-v6-c-customer.git"
|
|
|
|
|
|
#Git获取项目代码,执行composer更新
|
|
|
function getProjectCode()
|
|
|
{
|
|
|
cd $webPath$projectName
|
|
|
#判断是否存在git目录
|
|
|
if [ ! -d ".git" ]; then
|
|
|
rm -rf .htaccess
|
|
|
rm -rf .user.ini
|
|
|
cd ..
|
|
|
git clone -b dev $gitHttp $projectName
|
|
|
cd $projectName
|
|
|
composer install --ignore-platform-reqs
|
|
|
# .env文件处理
|
|
|
cp .env.example ./.env
|
|
|
else
|
|
|
git checkout .
|
|
|
git pull origin dev
|
|
|
composer update --ignore-platform-reqs
|
|
|
fi
|
|
|
}
|
|
|
|
|
|
# #Git获取项目代码,执行composer更新
|
|
|
getProjectCode
|
|
|
|
|
|
exit |
|
|
\ No newline at end of file |
...
|
...
|
|