定制 appleboy/php-git-deploy 二次开发

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

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

appleboy/php-git-deploy

最新稳定版本:1.0.0

Composer 安装命令:

composer require appleboy/php-git-deploy

包简介

Git Deployment with PHP

关键字:

README 文档

README

Using Post-Receive Hooks to deploy muliple projects automatically. Build Status

Ref: https://developer.github.com/webhooks/

Requirements

PHP-Git-Deploy works with PHP 5.3 or later.

Installation via Composer

Create a composer.json file in your project root and use it to define simply your dependencies:

{
    "require": {
        "appleboy/php-git-deploy": "1.0.*"
    }
}

Then install Composer in your project (or download the composer.phar directly):

$ curl -s http://getcomposer.org/installer | php

And finally ask Composer to install the dependencies:

$ php composer.phar install

Installation/Usage

Download files

Download and drag the following files into your application/ folder.

$ cp -r src/Web your_www/

Configure your profile

open src/Web/config.php file with your editor. Following is config formats.

$config['github'] = array(
    'project_name' => array(
        'branch_name' => array('base_path' => 'folder_path')
    )
);

project_name must be the same with your github project name, for example:

Your github project URL is https://github.com/appleboy/PHP-Git-Deploy

The project_name value is PHP-Git-Deploy, don't case sensitive.

Please refer the following example profiles.

Single project, Multi branch profile
array(
    'php-git-deploy' => array(
        'master' => array('base_path' => '/path/PHP-Git-Deploy_1/'),
        'develop' => array('base_path' => '/path/PHP-Git-Deploy_2/')
    )
);
Multi project, Multi branch profile
array(
    'php-git-deploy' => array(
        'master' => array('base_path' => '/path/PHP-Git-Deploy_1/'),
        'develop' => array('base_path' => '/path/PHP-Git-Deploy_2/')
    ),
    'codeigniter-my-model' => array(
        'master' => array('base_path' => '/path/CodeIgniter-MY-Model_1/'),
        'develop' => array('base_path' => '/path/CodeIgniter-MY-Model_2/')
    )
);

Create New index.php

Create new file your_www/Web/index.php, copy the following source code and paste into index.php file.

<?php
require_once('Deplpoy.php');
$deploy = new \Web\Deploy;
$deploy->index();

Setting Webhook URL

Please refer the Post-Receive Hooks Helper page

Webhook

Author

Bo-Yi Wu (appleboy) appleboy.tw@gmail.com

统计信息

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

GitHub 信息

  • Stars: 35
  • Watchers: 7
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: BSD
  • 更新时间: 2013-02-05