Skip to content

Commit b00d18c

Browse files
author
Will Hickey
authored
Add origin/ prefix for git diff when building CI pipeline. (#31638)
1 parent 3f34a6d commit b00d18c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ci/buildkite-pipeline.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ pull_or_push_steps() {
304304

305305
# Version bump PRs are an edge case that can skip most of the CI steps
306306
if affects .toml$ && affects .lock$ && ! affects_other_than .toml$ .lock$; then
307-
optional_old_version_number=$(git diff "$BUILDKITE_PULL_REQUEST_BASE_BRANCH"..HEAD validator/Cargo.toml | \
307+
optional_old_version_number=$(git diff origin/"$BUILDKITE_PULL_REQUEST_BASE_BRANCH"..HEAD validator/Cargo.toml | \
308308
grep -e "^-version" | sed 's/-version = "\(.*\)"/\1/')
309309
echo "optional_old_version_number: ->$optional_old_version_number<-"
310310
new_version_number=$(grep -e "^version = " validator/Cargo.toml | sed 's/version = "\(.*\)"/\1/')
@@ -314,7 +314,7 @@ pull_or_push_steps() {
314314
# lines that don't match. Any diff that produces output here is not a version bump.
315315
# | cat is a no-op. If this pull request is a version bump then grep will output no lines and have an exit code of 1.
316316
# Piping the output to cat prevents that non-zero exit code from exiting this script
317-
diff_other_than_version_bump=$(git diff "$BUILDKITE_PULL_REQUEST_BASE_BRANCH"..HEAD | \
317+
diff_other_than_version_bump=$(git diff origin/"$BUILDKITE_PULL_REQUEST_BASE_BRANCH"..HEAD | \
318318
grep -vE "^ |^@@ |^--- |^\+\+\+ |^index |^diff |^-( \")?solana.*$optional_old_version_number|^\+( \")?solana.*$new_version_number|^-version|^\+version"|cat)
319319
echo "diff_other_than_version_bump: ->$diff_other_than_version_bump<-"
320320

0 commit comments

Comments
 (0)