定制 amcolin/gitee-update 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

amcolin/gitee-update

Composer 安装命令:

composer require amcolin/gitee-update

包简介

gitee

README 文档

README

介绍

gitee更新代码后,网站自动更新代码

使用说明

composer require amcolin/gitee-update

加入app.php providers 数组中

\Amcolin\GiteeUpdate\GiteeUpdateProvider::class

生成gitee.php配置文件

php artisan vendor:publish --provider="Amcolin\GiteeUpdate\GiteeUpdateProvider"

配置
return [
    'password' => '' , // GIT钩子密码
    'nginxUser' => 'www' , // nginx用哪个用户跑
    'userGroup' => 'www' , // 用户所在组
];

常见问题

代码部署在docker中怎么用?

1.进入容器,查看代码文件所属用户。假设是nginx 2.先切换到nginx这个用户身份

su nginx

3.保存git密码

git config --global credential.helper store

4.执行 git pull 如果提示:

There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> master

执行 `git branch --set-upstream-to=origin/master master`

5.正常输入用户名和密码后,就可以使用了

如何检查是否成功更新

默认日志文件在 laravel.log中

tail -n 100 -f laravel.log | grep 'gitUpdate'

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-03-28