1、创建项目分支
function create_branch
{
svn cp -m "create branch $SVN_BRANCH"项目svn地址/$SVN_BRANCH
}
2、部署分支环境
function up_file
{
cd /data/wwwroot/xiaoe_admin
svn checkout svn地址/$SVN_BRANCH
chown -R www:www $SVN_BRANCH
}
up_file
function config_nginx
{
if [ -f "/usr/local/nginx/conf/vhost/$SVN_BRANCH.conf" ];then
echo 'nginx conf file is exist '$SVN_BRANCH''
else
echo 'server {
listen '$PORT';
server_name localhost;
index index.html index.htm index.php;
set $rootdir 项目路径/'$SVN_BRANCH'/public;
include version_type/version_type.conf;
root $rootdir;
if ($server_port = 80)
{
return 301 https://$server_name$request_uri;