From e9f7e348108c75c6021f2588856705d3b477f79a Mon Sep 17 00:00:00 2001 From: Mustafa Gezen Date: Tue, 1 Nov 2022 04:18:29 +0100 Subject: [PATCH] Target should be current merge --- hack/get_impacted_targets.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hack/get_impacted_targets.sh b/hack/get_impacted_targets.sh index c803124..a1ab291 100755 --- a/hack/get_impacted_targets.sh +++ b/hack/get_impacted_targets.sh @@ -9,8 +9,6 @@ workspace_dir="$(pwd)" $BAZEL_B //:bazel-diff -set -x - # Generate starting hashes echo "Base hash is $PULL_BASE_SHA" git checkout "$PULL_BASE_SHA" --quiet @@ -19,9 +17,9 @@ bazel-bin/bazel-diff generate-hashes -w "$workspace_dir" -b "$bazel_bin" startin # Generate ending hashes TARGET_HASH="$PULL_PULL_SHA" if [[ -z "$TARGET_HASH" ]]; then - TARGET_HASH="$(git log "HEAD@{1}" --pretty=format:"%H" --merges -n 1)" + TARGET_HASH="$(git log --pretty=format:"%H" --merges -n 1)" fi -echo "Target hash is $PULL_PULL_SHA" +echo "Target hash is $TARGET_HASH" git checkout "$TARGET_HASH" --quiet bazel-bin/bazel-diff generate-hashes -w "$workspace_dir" -b "$bazel_bin" ending_hashes_json