【问题标题】:composer install in post-receive in git hooks not workingcomposer install in post-receive in git hooks 不工作
【发布时间】:2017-08-14 07:23:59
【问题描述】:

我正在尝试使用 git post-receive 自动部署到我的生产服务器

这是我的脚本

#!/bin/sh
git --work-tree=/var/www/html/cushbu.com --git-dir=/var/repo/site.git checkout -f
echo running composer
composer install -d /var/www/html/cushbu.com
echo finished

但是composer install 命令不起作用还有什么方法可以知道当前执行后脚本的状态??

我无法在命令行中看到running composer 输出

更新

我添加了cd /var/www/html/cushbu.com && composer install,但它不起作用

【问题讨论】:

    标签: php git deployment composer-php git-post-receive


    【解决方案1】:

    试试

    composer install --working-dir=/var/www/html/cushbu.com -vvv > ~/composer.log 2>&1
    

    -vvv 标志将启用详细输出。 > ~/composer.log 2>&1 会将此输出写入您主目录中的 composer.log 文件。

    【讨论】:

      猜你喜欢
      • 2012-06-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多