2017-06-14 48 views

回答

0

打破尝试列表:

#!/bin/bash 
set -exo pipefail 
# fast-fail if gerrit change is not rebased 
if [ -z ${GERRIT_PROJECT+x} ]; then 
    pushd $GERRIT_PROJECT 
    MERGE_BASE=$(git merge-base HEAD origin/$GERRIT_BRANCH) 
    git rebase 
    [ "$MERGE_BASE" == "$(git merge-base HEAD origin/$GERRIT_BRANCH)" ] || { 
     echo "FATAL: Please rebase $GERRIT_CHANGE_URL change request before testing it." 
     exit 101 
    } 
    popd 
fi 

不知怎的,这个工作使用管道的一些工作,但失败了别人,我怀疑由于不同的结账方式。所以,仍然在寻找一种可靠的方式来做到这一点。

相关问题