Преглед изворни кода

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 пре 7 година
родитељ
комит
74348e8a55
1 измењених фајлова са 6 додато и 1 уклоњено
  1. 6 1
      .papr.sh

+ 6 - 1
.papr.sh

@@ -10,6 +10,7 @@ if [ -n "${PAPR_BRANCH:-}" ]; then
 else
   target_branch=$PAPR_PULL_TARGET_BRANCH
 fi
+target_branch_in=${target_branch}
 if [[ "${target_branch}" =~ ^release- ]]; then
   target_branch="${target_branch/release-/}"
 else
@@ -18,8 +19,12 @@ else
 fi
 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
-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