File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ module_dir=" ${1:- } "
5+
6+ if [[ -z " ${module_dir} " ]]; then
7+ echo " Usage: $0 <module_directory>"
8+ exit 1
9+ fi
10+
11+ # Find the repository root assuming this script is in .bazelci/
12+ script_dir=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
13+ repo_root=" $( dirname " ${script_dir} " ) "
14+
15+ cd " ${repo_root} "
16+
17+ if [[ ! -f " MODULE.bazel" ]]; then
18+ echo " Error: MODULE.bazel not found in ${repo_root} . Are you sure this is the repo root?"
19+ exit 1
20+ fi
21+
22+ if [[ ! -d " ${module_dir} " ]]; then
23+ echo " Error: Module directory '${module_dir} ' not found in ${repo_root} ."
24+ exit 1
25+ fi
26+
27+ echo " Removing files outside of ${module_dir} to simulate BCR environment..."
28+ find . -maxdepth 1 -mindepth 1 \
29+ ! -name " ${module_dir} " \
30+ ! -name " .git" \
31+ ! -name " .bazelci" \
32+ -exec rm -rf ' {}' +
Original file line number Diff line number Diff line change @@ -180,6 +180,8 @@ tasks:
180180 name : " Sphinxdocs: Ubuntu"
181181 working_directory : " sphinxdocs"
182182 platform : ubuntu2204
183+ shell_commands :
184+ - " ../.bazelci/isolate.sh sphinxdocs"
183185 build_targets :
184186 - " //..."
185187 test_targets :
@@ -188,6 +190,8 @@ tasks:
188190 name : " Sphinxdocs: Mac"
189191 working_directory : " sphinxdocs"
190192 platform : macos_arm64
193+ shell_commands :
194+ - " ../.bazelci/isolate.sh sphinxdocs"
191195 build_targets :
192196 - " //..."
193197 test_targets :
You can’t perform that action at this time.
0 commit comments