message: Get the latest stable branch from git
diff: @@ -41,7 +41,7 @@ function print_usage {
  ARGUMENTS=$@
  BUILD_FLAGS=""
  TARGET_ARCHS=x86,x86_64,arm64-v8a,armeabi-v7a
  -FLAG_CHECKPOINT="r2.4" # TODO(b/163918542) Set default to lastest release.
  +FLAG_CHECKPOINT=""
  if [ "$#" -gt 4 ]; then
  echo "ERROR: Too many arguments."
  @@ -112,6 +112,11 @@ else
  # Pull the latest code from tensorflow.
  git pull -a
  +
  + # Get the latest stable branch.
  + if [ -z ${FLAG_CHECKPOINT} ]; then
  + FLAG_CHECKPOINT="v$(git tag -l | grep "^v[0-9\.]*$" | cut -c2- | sort -t. -rn -k1 -k2 -k3 | head -n1)"
  + fi
  git checkout ${FLAG_CHECKPOINT}
  # Configure Bazel.
  