Skip to content

Commit

Permalink
use CHANGE_TARGET to rebase on actual PR target
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Sokołowski <jakub@status.im>
  • Loading branch information
jakubgs committed May 15, 2019
1 parent c90fe74 commit 4f4cc91
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ci/utils.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,14 @@ def doGitRebase() {
println 'Skipping rebase due to release build...'
return
}
def rebaseBranch = 'develop'
if (CHANGE_TARGET) { /* This is available for PR builds */
rebaseBranch = CHANGE_TARGET
}
sh 'git status'
sh 'git fetch --force origin develop:develop'
sh "git fetch --force origin ${rebaseBranch}:${rebaseBranch}"
try {
sh 'git rebase develop'
sh "git rebase ${rebaseBranch}"
} catch (e) {
sh 'git rebase --abort'
throw e
Expand Down

0 comments on commit 4f4cc91

Please sign in to comment.