Skip to content

Commit

Permalink
remove extra changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SalmaSamy committed Sep 13, 2023
1 parent ed3d351 commit 5b025e1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
9 changes: 0 additions & 9 deletions scripts/bootstrap/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -253,15 +253,6 @@ if [ -z "${BAZEL_SKIP_JAVA_COMPILATION}" ]; then
workspace(name = 'bazel_tools')
EOF

# Set up the MODULE.bazel file for `bazel_tools` and update the hash in the lockfile.
link_file "${PWD}/src/MODULE.tools" "${BAZEL_TOOLS_REPO}/MODULE.bazel"
new_hash=$(shasum -a 256 "${BAZEL_TOOLS_REPO}/MODULE.bazel" | awk '{print $1}')
sed -i.bak "/\"bazel_tools\":/s/\"[a-f0-9]*\"/\"$new_hash\"/" MODULE.bazel.lock
# TODO: Temporary hack for lockfile version mismatch, remove these two lines after updating to 6.4.0
sed -i.bak 's/"lockFileVersion": 1/"lockFileVersion": 2/' MODULE.bazel.lock
sed -i.bak 's/"moduleExtensions":/"moduleExtensions-old":/' MODULE.bazel.lock
rm MODULE.bazel.lock.bak

mkdir -p "${BAZEL_TOOLS_REPO}/src/conditions"
link_file "${PWD}/src/conditions/BUILD.tools" \
"${BAZEL_TOOLS_REPO}/src/conditions/BUILD"
Expand Down
14 changes: 1 addition & 13 deletions src/test/shell/bazel/bazel_determinism_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,7 @@ function test_determinism() {
cd "${workdir}" || fail "Could not change to work directory"
unzip -q "${DISTFILE}"

# Set up the maven repository properly.
cp derived/maven/BUILD.vendor derived/maven/BUILD

# Update the hash of bazel_tools in lockfile to avoid rerunning module resolution.
new_hash=$(shasum -a 256 "src/MODULE.tools" | awk '{print $1}')
sed -i.bak "/\"bazel_tools\":/s/\"[a-f0-9]*\"/\"$new_hash\"/" MODULE.bazel.lock
# TODO: Temporary hack for lockfile version mismatch, remove these two lines after updating to 6.4.0
sed -i.bak 's/"lockFileVersion": 1/"lockFileVersion": 2/' MODULE.bazel.lock
sed -i.bak 's/"moduleExtensions":/"moduleExtensions-old":/' MODULE.bazel.lock
rm MODULE.bazel.lock.bak

# Use @bazel_tools//tools/python:autodetecting_toolchain to avoid
# downloading python toolchain.
distdir="derived/distdir"

# Build Bazel once.
bazel \
Expand Down

0 comments on commit 5b025e1

Please sign in to comment.