Explorar o código

Fix papr.sh target branch for rebase

This commit corrects target_branch variable
to allow for detection of branch the patch is
for.
Michael Gugino %!s(int64=7) %!d(string=hai) anos
pai
achega
74348e8a55
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      .papr.sh

+ 6 - 1
.papr.sh

@@ -10,6 +10,7 @@ if [ -n "${PAPR_BRANCH:-}" ]; then
 else
 else
   target_branch=$PAPR_PULL_TARGET_BRANCH
   target_branch=$PAPR_PULL_TARGET_BRANCH
 fi
 fi
+target_branch_in=${target_branch}
 if [[ "${target_branch}" =~ ^release- ]]; then
 if [[ "${target_branch}" =~ ^release- ]]; then
   target_branch="${target_branch/release-/}"
   target_branch="${target_branch/release-/}"
 else
 else
@@ -18,8 +19,12 @@ else
 fi
 fi
 export target_branch
 export target_branch
 
 
+# Need to define some git variables for rebase.
+git config --global user.email "ci@openshift.org"
+git config --global user.name "OpenShift Atomic CI"
+
 # Rebase existing branch on the latest code locally, as PAPR running doesn't do merges
 # Rebase existing branch on the latest code locally, as PAPR running doesn't do merges
-git fetch origin ${target_branch} && git rebase origin/${target_branch}
+git fetch origin ${target_branch_in} && git rebase origin/${target_branch_in}
 
 
 pip install -r requirements.txt
 pip install -r requirements.txt