peridot/hack/frontend_build.sh

27 lines
649 B
Bash
Raw Normal View History

2022-10-30 08:44:59 +00:00
#!/usr/bin/env bash
set -o errexit
source hack/bazel_setup.sh
bazel_bin="$(which bazel)"
workspace_dir="$(pwd)"
$BAZEL_B //:bazel-diff
# Generate starting hashes
git checkout "$PULL_BASE_SHA" --quiet
bazel-bin/bazel-diff generate-hashes -w "$workspace_dir" -b "$bazel_bin" starting_hashes_json
# Generate ending hashes
git checkout "$PULL_PULL_SHA" --quiet
bazel-bin/bazel-diff generate-hashes -w "$workspace_dir" -b "$bazel_bin" ending_hashes_json
# Get impacted targets
2022-10-30 09:01:07 +00:00
bazel-bin/bazel-diff get-impacted-targets -sh starting_hashes_json -fh ending_hashes_json -o impacted_targets
2022-10-30 08:44:59 +00:00
# Build impacted targets
hack/build_impacted_frontend.sh