فهرست منبع

Make update_depot_tools tell you if it's skipping an update.

I set DEPOT_TOOLS_UPDATE to 0 because I sometimes contribute to
depot_tools (and because I was negatively impacted a few times in the
past by a depot tools update in ways that I can't recall.)

Anyway, if you set the DEPOT_TOOLS_UPDATE variable to 0, then even
explicitly doing `update_depot_tools` from the command line will not
actually do an update, you need to set the environment variable to a
different value before attempting an update.

This script is so old that its behavior probably shouldn't be changed.
But we can tell the user what update_depot_tools is doing and why, and
how to get it to do a real update.

Change-Id: I67458e78b5e64f8ea75ffad73b2ede0955c4d91f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5824829
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gregory Nisbet <gregorynisbet@google.com>
Gregory NISBET 11 ماه پیش
والد
کامیت
ae2bc61bf0
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      update_depot_tools

+ 3 - 1
update_depot_tools

@@ -119,7 +119,9 @@ function update_git_repo {
 }
 
 # Update git checkouts.
-if [ "X$DEPOT_TOOLS_UPDATE" != "X0" ]; then
+if [ "X$DEPOT_TOOLS_UPDATE" = "X0" ]; then
+  echo "DEPOT_TOOLS_UPDATE environment variable is 0, skipping update. Set DEPOT_TOOLS_UPDATE to 1 to force update." >&2
+else
   if [ -e "$base_dir/.git" ]; then
     cd "$base_dir"
     update_git_repo