mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-27 17:10:22 -04:00
[CI] Correct the way merge base is identified (#130175)
Without fetching, the local repository might be missing reference to the base branch, causing git merge-base to fail.
This commit is contained in:
parent
a7156f8b1b
commit
7c213baf4d
1 changed files with 2 additions and 1 deletions
|
@ -18,7 +18,8 @@ fi
|
|||
|
||||
# Identify the merge base of the current commit (branch) and the base branch of the pull request.
|
||||
# PR upgrade tests are run from the merge base to the current commit.
|
||||
BASE_COMMIT=$(git merge-base $BUILDKITE_PULL_REQUEST_BASE_BRANCH $BUILDKITE_COMMIT)
|
||||
git fetch origin $BUILDKITE_PULL_REQUEST_BASE_BRANCH
|
||||
BASE_COMMIT=$(git merge-base origin/$BUILDKITE_PULL_REQUEST_BASE_BRANCH $BUILDKITE_COMMIT)
|
||||
|
||||
VERSION=$(sed -n 's/^elasticsearch[[:space:]]*=[[:space:]]*\(.*\)/\1/p' build-tools-internal/version.properties)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue