【问题标题】:Check post commit message to update staging and live server检查提交后消息以更新登台和实时服务器
【发布时间】:2015-10-22 01:40:48
【问题描述】:

我们有一个 staging 和 live,我们想根据作者或开发者发送的提交消息更新一个 staging 和 live 服务器的工作副本

例子

如果我们只想在 staging 中提交,我们将只提交文件并有这样的提交消息“更改 index.php 代码 [staging]”,然后如果我们更新 staging 文件夹或服务器上的工作副本执行类似“更改 index.php 代码 [staging][live]”的提交消息,然后将更新登台和实时服务器。

这是我到目前为止所做的 在 post_commit 我添加了这一行

svn update --quiet --trust-server-cert --non-interactive --username xxxxxx --password xxxxxx /var/www/staging

我们想要在代码中做的是

if commit-message contains "[staging]"
    svn update --quiet --trust-server-cert --non-interactive --username xxxxxx --password xxxxxx /var/www/staging

if commit-message contains "[live]"
      svn update --quiet --trust-server-cert --non-interactive --username xxxxxx --password xxxxxx /var/www/live

这可能吗?

【问题讨论】:

    标签: svn hook


    【解决方案1】:

    这可能吗?

    是的,这是可能的。但你想问“怎么做?”

    【讨论】:

      猜你喜欢
      • 2013-10-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-10
      • 2012-10-15
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多