Uninote
Uninote

迭代7发布来源

pre更新

  • vim sprint7.sh

  • bash sprint7.sh

    #!/bin/bash
    cd `dirname $0`
    currentPath=`pwd`
    cd /home/www/biglove-workerman
    git fetch --all
    git pull
    cd /home/www/dajx-api
    git fetch --all
    git checkout sprint7
    git pull
    cd /home/www/biglove-cms
    git fetch --all
    git checkout sprint7
    git pull
    cd /home/www/dajx-staff-api
    git fetch --all
    git pull
    git checkout sprint7
    mysql -u root -proot <<ENDTAG
    use dajx-api;
    source /home/www/dajx-api/documents/hcg_update.sql;
    ENDTAG
    # crontab
    echo -e '#订单预约时间之前一个小时提示员工(hcg)\n* * * * * root curl https://pre.staffapi.dajxyl.com/order/order-start-notify' >> /etc/crontab
    service crond restart
    cd $currentPath
    tar xf letsencrypt.pre.tar.gz -C /etc/
    # é¨ç½²ç¯å¢å称
    deployment=dajxdocs
    # docs ç¸å³
    front_host=docs.dajxyl.com
    gogs_host=docs.dajxyl.com
    es_host=es.uninote.com.cn
    es_index=dajxdocs
    # dajx ç¸å³
    dajx_api_host=test2.api.dajxyl.com
    dajx_staff_api_host=test2.staffapi.dajxyl.com
    dajx_cms_host=test2.admin.dajxyl.com
    dajx_www_host=test2.www.dajxyl.com
    front_host=$dajx_api_host
    gt_api=dajx_api_test2_
    gt_staffapi=dajx_staff_api_test2_
            sed -i "s#https://staffapi.dajxyl.com#https://$dajx_staff_api_host#" /home/www/additional_item/logviewer/logs.php
            sed -i "s#https://api.dajxyl.com#https://$dajx_api_host#" /home/www/additional_item/logviewer/logs.php
            sed -i "s#https://api.dajxyl.com#https://$dajx_api_host#g" /home/www/biglove-cms/cms/config/__params.php
            sed -i "s#https://staffapi.dajxyl.com#https://$dajx_staff_api_host#g" /home/www/biglove-cms/cms/config/__params.php
            sed -i "s#dajx_api_#$gt_api#g" /home/www/biglove-cms/cms/config/__params.php
            sed -i "s#dajx_staff_#$gt_staffapi#g" /home/www/biglove-cms/cms/config/__params.php
            sed -i "s#/live/admin.dajxyl.com#/live/$dajx_cms_host#" /home/www/biglove-workerman/Config/__config.php
            sed -i "s#dajx_staff_api_#$gt_staffapi#" /home/www/biglove-workerman/Config/__config.php
            sed -i "s#dajx_api_#$gt_api#" /home/www/biglove-workerman/Config/__config.php
            sed -i "s#staffapi.dajxyl.com#$dajx_staff_api_host#g" /home/www/dajx-staff-api/config/__params.php
            sed -i "s#dajx_staff_api_#$gt_staffapi#g" /home/www/dajx-staff-api/config/__params.php
            sed -i "s#dajx_api_#$gt_api#g" /home/www/dajx-staff-api/config/__params.php
            sed -i "s#https://www.dajxyl.com/#https://$dajx_www_host/#" /home/www/dajx-api/config/__params.php
            sed -i "s#dajx_staff_api_#$gt_staffapi#g" /home/www/dajx-api/config/__params.php
            sed -i "s#dajx_staff_#$gt_staffapi#g" /home/www/dajx-api/config/__params.php
            sed -i "s#https://api.dajxyl.com#https://$dajx_api_host#g" /home/www/dajx-api/config/__params.php
            sed -i "s#live/api.dajxyl.com#live/$dajx_api_host#g" /usr/local/nginx/conf/vhost/dajx_api_ssl.conf
            sed -i "s#server_name api.dajxyl.com#server_name $dajx_api_host#g" /usr/local/nginx/conf/vhost/dajx_api_ssl.conf
            sed -i "s#server_name admin.dajxyl.com#server_name $dajx_cms_host#g" /usr/local/nginx/conf/vhost/dajx_cms_ssl.conf
            sed -i "s#live/admin.dajxyl.com#live/$dajx_cms_host#g" /usr/local/nginx/conf/vhost/dajx_cms_ssl.conf
            sed -i "s#server_name staffapi.dajxyl.com#server_name $dajx_staff_api_host#g" /usr/local/nginx/conf/vhost/dajx_staff_api_ssl.conf
            sed -i "s#live/staffapi.dajxyl.com#live/$dajx_staff_api_host#g" /usr/local/nginx/conf/vhost/dajx_staff_api_ssl.conf
            sed -i "s#server_name www.dajxyl.com#server_name $dajx_www_host#g" /usr/local/nginx/conf/vhost/dajx_www_ssl.conf
            sed -i "s#live/www.dajxyl.com#live/$dajx_www_host#g" /usr/local/nginx/conf/vhost/dajx_www_ssl.conf
            sed -i "s#https://www.dajxyl.com#https://$dajx_www_host#g" /usr/local/nginx/conf/vhost/dajx_www_ssl.conf
            nginx -s reload
    # test2 config dump to git
    [ ! -d /server/scripts ] && mkdir -p /server/scripts
    cd /server/scripts && rm -rf ./*
    git clone git@git.dajxyl.com:dajx/prj-utils.git . && rm -rf .git
    bash dumpconfig.sh test2 root
    
  • 配置文件修改

  • 配置文件导入

  • 导出测试

  • 回滚测试

     cd dajx-api/
     git reset --hard bb8d181ad28f69fd5782101515905928e7bd9868
     cd ../dajx-staff-api/
     git reset --hard a59f9b0238e5a16791c8c1f6d1734119539bffb4
     cd ../biglove-cms/
     git reset --hard b9fc10fadaf8e81e73ced2dddb501fcaac7e76e5
     cd ../biglove-workerman/
     git reset --hard be6c7078ad20cbe12dde2b31df6daed7b83a69eb
     use dajx-api;delete from menu where title like '%套餐管理%';delete from menu where `id`=1102;
    

online-环境发布

  • vim sprint7.sh #内容如下

  • bash sprint7.sh #执行更新脚本

    #!bin/bash
    cd /home/www/dajx-api
    git fetch --all
    git checkout sprint7
    git pull
    git reset --hard eaf45300f6750ac3556fb901272a62d400c662f2
    cd /home/www/biglove-cms
    git fetch --all
    git checkout sprint7
    git pull
    git reset --hard cf50175ed63b16c33689d10d7b33477342994dfa
    cd /home/www/dajx-staff-api
    git fetch --all
    git pull
    git reset --hard d380233e94f2e76c04fd50f2ab2fe385fbe26d89
    git checkout sprint7
    [ ! -f /home/www/dajx-api/documents/zxd_update.sql ] && echo "git pull ERROR." && exit
    cd /home/www
    for i in biglove-cms dajx-api dajx-staff-api ;do chown -R www.www $i;done
    mysql -uroot -proot <<ENDTAG
    use dajx-api;
    source /home/www/dajx-api/documents/hcg_update.sql;
    source /home/www/dajx-api/documents/zxd_update.sql;
    UPDATE `staff` SET `balance`='0';
    UPDATE `staff` SET `withdraw`='0';
    ALTER TABLE `user_third`
    

MODIFY COLUMN type tinyint(4) UNSIGNED NULL DEFAULT 0 COMMENT '0:微信小程序登录 1:app微信登录' AFTER nick_name; ENDTAG mysql -uroot -proot <<ENDTAG use biglove; INSERT INTO access (pid, title, urls) VALUES ('0', '创建订单', '/admin/order/add.html'); INSERT INTO access (pid, title, urls) VALUES ('0', '套餐服务列表页面', '/admin/combo/index.html'); INSERT INTO access (pid, title, urls) VALUES ('0', '新建套餐', '/admin/combo/add.html'); INSERT INTO access (pid, title, urls) VALUES ('0', '编辑套餐', '/admin/combo/edit.html'); INSERT INTO access (pid, title, urls) VALUES ('0', '删除套餐', '/admin/combo/del.html'); INSERT INTO access (pid, title, urls) VALUES ('0', '上架套餐', '/admin/combo/release.html'); INSERT INTO access (pid, title, urls) VALUES ('0', '下架套餐', '/admin/combo/cancel.html'); INSERT INTO access (pid, title, urls) VALUES ('0', '编辑套餐-获取服务的规格信息', '/admin/combo/getServiceSpec.html'); INSERT INTO access (pid, title, urls) VALUES ('0', '套餐购买记录页面', '/admin/combo/order.html'); INSERT INTO access (pid, title, urls) VALUES ('0', '服务管理-编辑多规格', '/admin/service/edit_service_spec.html'); INSERT INTO access (pid, title, urls) VALUES ('0', '服务管理-删除多规格', '/admin/service/del_service_spec.html'); INSERT INTO access (pid, title, urls) VALUES ('0', '服务管理-编辑补时多规格', '/admin/service/edit_service_sub_order_spec.html'); INSERT INTO access (pid, title, urls) VALUES ('0', '服务管理-删除补时多规格', '/admin/service/del_service_sub_order_spec.html'); INSERT INTO access (pid, title, urls) VALUES ('0', '服务管理-编辑返佣多规格', '/admin/service/edit_service_reward_spec.html'); INSERT INTO access (pid, title, urls) VALUES ('0', '服务管理-删除返佣多规格', '/admin/service/del_service_reward_spec.html'); INSERT INTO access (pid, title, urls) VALUES ('0', '服务管理-获取多规格', '/admin/service/getServiceSpecs.html'); INSERT INTO access (pid, title, urls) VALUES ('0', '服务管理-获取补时多规格', '/admin/service/getServiceSubOrderSpecs.html'); ENDTAG

crontab

echo -e '#订单预约时间之前一个小时提示员工(hcg)\n* * * * * root curl https://staffapi.dajxyl.com/order/order-start-notify' >>/etc/crontab service crond restart [ ! -d /server/scripts ] && mkdir -p /server/scripts cd /server/scripts && rm -rf ./* git clone git@git.dajxyl.com:dajx/prj-utils.git . && rm -rf .git bash dumpconfig.sh online root


- 配置文件导出和修改
- 导入配置文件

## online-更新后检查

```bash
]# cd /home/www;for i in dajx-api dajx-staff-api biglove-cms biglove-workerman;do echo -e "\033[031m$i\033[0m";cd $i ;git log -1; git status; cd ..;done

online-apk上传

#client
cd /home/www/dajx-api/download/;rm -f app-release.apk;ln -s source.apk app-release.apk
cd /home/www/dajx-staff-api/download;rm -f rm staff-release.apk;ln -s source.apk staff-release.apk

迭代6发布报告

迭代8.5发布报告

点赞(0) 阅读(1) 举报
目录
标题