Prepare build jobs for 1.13.2 patch release

PiperOrigin-RevId: 256092770
diff --git a/configure.py b/configure.py
index f68aed4..db7004c 100644
--- a/configure.py
+++ b/configure.py
@@ -50,7 +50,7 @@
 _TF_BAZELRC = ''
 _TF_CURRENT_BAZEL_VERSION = None
 _TF_MIN_BAZEL_VERSION = '0.24.1'
-_TF_MAX_BAZEL_VERSION = '0.26.1'
+_TF_MAX_BAZEL_VERSION = '0.24.1'
 
 NCCL_LIB_PATHS = [
     'lib64/', 'lib/powerpc64le-linux-gnu/', 'lib/x86_64-linux-gnu/', ''
diff --git a/tensorflow/tools/ci_build/builds/libtensorflow.sh b/tensorflow/tools/ci_build/builds/libtensorflow.sh
index 30d5efb..c3c103a 100755
--- a/tensorflow/tools/ci_build/builds/libtensorflow.sh
+++ b/tensorflow/tools/ci_build/builds/libtensorflow.sh
@@ -58,6 +58,12 @@
     export TF_NEED_ROCM=0
   fi
   bazel clean --expunge
+  # Don't do in-place sed as this needs to run on mac and linux
+  sed \
+    -e "s/^_TF_MIN_BAZEL_VERSION =.*$/_TF_MIN_BAZEL_VERSION = '0.24.1'/" \
+    -e "s/^_TF_MAX_BAZEL_VERSION =.*$/_TF_MAX_BAZEL_VERSION = '0.24.1'/" \
+    configure.py > configure.py.new
+  mv configure.py.new configure.py
   yes "" | ./configure
 
   # Remove this test call when
diff --git a/tensorflow/tools/ci_build/ci_sanity.sh b/tensorflow/tools/ci_build/ci_sanity.sh
index b78281d..9503806 100755
--- a/tensorflow/tools/ci_build/ci_sanity.sh
+++ b/tensorflow/tools/ci_build/ci_sanity.sh
@@ -592,6 +592,10 @@
   do
     export TF_NEED_CUDA=${WITH_CUDA}
     export PYTHON_BIN_PATH=$(which python)
+    sed -i \
+      -e "s/^_TF_MIN_BAZEL_VERSION =.*$/_TF_MIN_BAZEL_VERSION = '0.24.1'/" \
+      -e "s/^_TF_MAX_BAZEL_VERSION =.*$/_TF_MAX_BAZEL_VERSION = '0.24.1'/" \
+      configure.py
     yes "" | ./configure
 
     RESULT=$?
diff --git a/tensorflow/tools/ci_build/windows/bazel/bazel_test_lib.sh b/tensorflow/tools/ci_build/windows/bazel/bazel_test_lib.sh
index 6736209..d43d8a6 100644
--- a/tensorflow/tools/ci_build/windows/bazel/bazel_test_lib.sh
+++ b/tensorflow/tools/ci_build/windows/bazel/bazel_test_lib.sh
@@ -16,6 +16,10 @@
 #
 
 function run_configure_for_cpu_build {
+  sed -i \
+    -e "s/^_TF_MIN_BAZEL_VERSION =.*$/_TF_MIN_BAZEL_VERSION = '0.24.1'/" \
+    -e "s/^_TF_MAX_BAZEL_VERSION =.*$/_TF_MAX_BAZEL_VERSION = '0.24.1'/" \
+    configure.py
   yes "" | ./configure
 }
 
@@ -23,6 +27,10 @@
   # Enable CUDA support
   export TF_NEED_CUDA=1
 
+  sed -i \
+    -e "s/^_TF_MIN_BAZEL_VERSION =.*$/_TF_MIN_BAZEL_VERSION = '0.24.1'/" \
+    -e "s/^_TF_MAX_BAZEL_VERSION =.*$/_TF_MAX_BAZEL_VERSION = '0.24.1'/" \
+    configure.py
   yes "" | ./configure
 }