use CHANGE_TARGET to rebase on actual PR target
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
c90fe74d9f
commit
4f4cc91b88
|
@ -51,10 +51,14 @@ def doGitRebase() {
|
||||||
println 'Skipping rebase due to release build...'
|
println 'Skipping rebase due to release build...'
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
def rebaseBranch = 'develop'
|
||||||
|
if (CHANGE_TARGET) { /* This is available for PR builds */
|
||||||
|
rebaseBranch = CHANGE_TARGET
|
||||||
|
}
|
||||||
sh 'git status'
|
sh 'git status'
|
||||||
sh 'git fetch --force origin develop:develop'
|
sh "git fetch --force origin ${rebaseBranch}:${rebaseBranch}"
|
||||||
try {
|
try {
|
||||||
sh 'git rebase develop'
|
sh "git rebase ${rebaseBranch}"
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
sh 'git rebase --abort'
|
sh 'git rebase --abort'
|
||||||
throw e
|
throw e
|
||||||
|
|
Loading…
Reference in New Issue