【问题标题】:Why not working shell command with variables on envoy?为什么不在特使上使用带有变量的 shell 命令?
【发布时间】:2019-12-08 15:34:03
【问题描述】:

我有简单的 Envoy 设置。服务器:

@task('build_todo_list', ['on'=> $server])
    echo 'Build todo list'
    cd {{ $releases_dir }}
    current=$(ls -td -- * | head -n 1 | cut -d'/' -f1)

    d=$(echo $current | cut -c 1-8)
    echo $d
    since=$(date -d $d +"%Y-%m-%d")
    until=$(date +"%Y-%m-%d")
    echo $since
    echo $until
    cd {{$source_dir}}
    git log staging --pretty="%an %B" --since=$since --until=$until | grep 'Fixed \| Did'
@endtask

但我有一个错误,因为我在 git log 命令中使用了 $since 和 $until 变量。这个变量很好地与 echo 命令配合使用。

【问题讨论】:

    标签: laravel bash laravel-envoy


    【解决方案1】:

    问题一直不是变量。如果在“since”和“until”之间没有记录 - 将不会成功完成任务。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-06-20
      • 2017-10-03
      • 1970-01-01
      • 1970-01-01
      • 2021-05-22
      • 1970-01-01
      • 2015-04-18
      相关资源
      最近更新 更多