Skip to content

Commit

Permalink
changed base commit defition
Browse files Browse the repository at this point in the history
  • Loading branch information
oakrizan committed Nov 27, 2023
1 parent 5c98102 commit ee5c9af
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .buildkite/scripts/image-util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,10 @@
set -euo pipefail

get_base_commit() {
local base_commit

if [[ ${BUILDKITE_PULL_REQUEST} != "false" ]]; then
base_commit=$(git rev-parse "origin/pr/${BUILDKITE_PULL_REQUEST}" | sed 's/ *$//g')
fi

if [[ -z $base_commit ]]; then
git rev-parse HEAD
git rev-parse "origin/pr/${BUILDKITE_PULL_REQUEST}" | sed 's/ *$//g'
else
echo "${base_commit}"
git rev-parse HEAD
fi
}

Expand Down

0 comments on commit ee5c9af

Please sign in to comment.