Skip to content

Commit

Permalink
[ci] diff with main merge-base (#69308)
Browse files Browse the repository at this point in the history
Basically a reland of ec9d80e but now
with fetching of main before that to get a correct merge base.
  • Loading branch information
metaflow authored Oct 17, 2023
1 parent f0601c7 commit 815193f
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions .ci/generate-buildkite-pipeline-premerge
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,11 @@ set -eu
set -o pipefail

# Environment variables script works with:
# List of files affected by this commit
: ${MODIFIED_FILES:=$(git diff --name-only HEAD~1)}

# Fetch origin/main to have an up to date merge base for main...HEAD diff.
git fetch origin main:main
echo "files modified HEAD~1" >&2
git --no-pager diff --name-only HEAD~1 >&2
echo "files modified main...HEAD" >&2
git --no-pager diff --name-only main...HEAD | head -n 10 >&2
merge_base=$(git merge-base main HEAD)
echo "merge base with main $merge_base" >&2
echo "git log" >&2
git --no-pager log --oneline --abbrev-commit -n 5 >&2
# List of files affected by this commit
: ${MODIFIED_FILES:=$(git diff --name-only main...HEAD)}
# Filter rules for generic windows tests
: ${WINDOWS_AGENTS:='{"queue": "windows"}'}
# Filter rules for generic linux tests
Expand Down

0 comments on commit 815193f

Please sign in to comment.