2019-04-24 08:38:01 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -euxo pipefail
|
|
|
|
|
2020-05-28 19:37:15 +00:00
|
|
|
KUBESPRAY_NEXT_VERSION=2.$(( ${KUBESPRAY_VERSION:3:2} + 1 ))
|
|
|
|
|
|
|
|
# Rebase PRs on master (or release branch) to get latest changes
|
2019-06-10 18:17:05 +00:00
|
|
|
if [[ $CI_COMMIT_REF_NAME == pr-* ]]; then
|
|
|
|
git config user.email "ci@kubespray.io"
|
|
|
|
git config user.name "CI"
|
2020-05-28 19:37:15 +00:00
|
|
|
if [[ -z "`git branch -a --list origin/release-$KUBESPRAY_NEXT_VERSION`" ]]; then
|
|
|
|
git pull --rebase origin master
|
|
|
|
else
|
|
|
|
git pull --rebase origin release-$KUBESPRAY_NEXT_VERSION
|
|
|
|
fi
|
2019-06-10 18:17:05 +00:00
|
|
|
fi
|