phamviet/command-builder 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

phamviet/command-builder

最新稳定版本:v1.0.2

Composer 安装命令:

composer require phamviet/command-builder

包简介

README 文档

README

** Example

$which = new Which('node');
$which->setEnvironment('PATH', '/usr/bin:/usr/local/bin');

*** SSH

$sshOptions = [
    'StrictHostKeyChecking' => 'false',
    'UserKnownHostsFile'    => '/home/user/.ssh/custom_known_hosts',
];
$ssh = new Ssh();
$ssh->setIdentity('/home/user/.ssh/custom_id_rsa');
$ssh->setOptions($sshOptions);

*** GIT

$git = new Git('clone');
$git
    ->setRepository('git@github.com:phamviet/command-builder.git')
    ->cloneTo("/home/user/public_html")
    ->setEnvironment('GIT_SSH_COMMAND', $ssh);

$git = new Git('pull');
$git->setEnvironment('GIT_SSH_COMMAND', $ssh);
$git->run('/Users/viet/www/himmag');


*** MYSQL

$mysql = new Mysql();
$mysql
    ->setUser('user')
    ->setPassword('password')
    ->setDatabase('db_name')
    ->setFromFile('/path/to/restore/db.sql');


*** RSYNC

$rsync = new Rsync();
$rsync
    ->setOption('avz')
    ->setSsh($ssh);

$rsync
    ->setSource('source')
    ->setTarget('target');

*** du

Du::getSize('/path');

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-09-15