diff --git a/jenkins/build-opm-module.sh b/jenkins/build-opm-module.sh index 03c62075b..32fdb0d34 100755 --- a/jenkins/build-opm-module.sh +++ b/jenkins/build-opm-module.sh @@ -12,7 +12,7 @@ function parseRevisions { do if grep -qi "$upstream=" <<< $ghprbCommentBody then - upstreamRev[$upstream]=pull/`echo $ghprbCommentBody | sed -r "s/.*${upstream,,}=([0-9]+).*/\1/g"`/head + upstreamRev[$upstream]=pull/`echo $ghprbCommentBody | sed -r "s/.*${upstream,,}=([0-9]+).*/\1/g"`/merge fi done if grep -q "with downstreams" <<< $ghprbCommentBody @@ -21,7 +21,7 @@ function parseRevisions { do if grep -qi "$downstream=" <<< $ghprbCommentBody then - downstreamRev[$downstream]=pull/`echo $ghprbCommentBody | sed -r "s/.*${downstream,,}=([0-9]+).*/\1/g"`/head + downstreamRev[$downstream]=pull/`echo $ghprbCommentBody | sed -r "s/.*${downstream,,}=([0-9]+).*/\1/g"`/merge fi done fi @@ -130,18 +130,8 @@ function clone_module { else git remote add origin https://github.com/OPM/$1 fi - # Complication due to github slow merge ref updates - if [ "$2" == "master" ] - then - git fetch --depth 1 origin $2:branch_to_build - git checkout branch_to_build - else - git fetch --depth 1 origin master - git fetch --depth 1 origin $2:branch_to_build - git checkout master - git merge branch_to_build - test $? -eq 0 || exit 1 - fi + git fetch --depth 1 origin $2:branch_to_build + git checkout branch_to_build git log HEAD -1 | cat test $? -eq 0 || exit 1 popd