Commit b9aca949 authored by Edward Lemur's avatar Edward Lemur Committed by Commit Bot

gclient: Skip calling update_depot_tools if DEPOT_TOOLS_UPDATE is 0.

Change-Id: Id33839077b3bc8748185d93ab13ed028a05b7fd1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1825994Reviewed-by: 's avatarAnthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
parent f1b21e46
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
base_dir=$(dirname "$0") base_dir=$(dirname "$0")
if [[ "#grep#fetch#cleanup#diff#setdep#" != *"#$1#"* ]]; then if [[ "#grep#fetch#cleanup#diff#setdep#" != *"#$1#"* ]]; then
# Shall skip authomatic update?
if [[ $DEPOT_TOOLS_UPDATE != 0 ]]; then
"$base_dir"/update_depot_tools "$@" "$base_dir"/update_depot_tools "$@"
case $? in case $? in
123) 123)
...@@ -17,6 +19,7 @@ if [[ "#grep#fetch#cleanup#diff#setdep#" != *"#$1#"* ]]; then ...@@ -17,6 +19,7 @@ if [[ "#grep#fetch#cleanup#diff#setdep#" != *"#$1#"* ]]; then
*) *)
exit $? exit $?
esac esac
fi
fi fi
# Ensure that "depot_tools" is somewhere in PATH so this tool can be used # Ensure that "depot_tools" is somewhere in PATH so this tool can be used
......
...@@ -4,9 +4,13 @@ ...@@ -4,9 +4,13 @@
:: found in the LICENSE file. :: found in the LICENSE file.
setlocal setlocal
:: Shall skip automatic update?
IF "%DEPOT_TOOLS_UPDATE%" == "0" GOTO :CALL_GCLIENT
:: Synchronize the root directory before deferring control back to gclient.py. :: Synchronize the root directory before deferring control back to gclient.py.
call "%~dp0update_depot_tools.bat" %* call "%~dp0update_depot_tools.bat" %*
:CALL_GCLIENT
:: Ensure that "depot_tools" is somewhere in PATH so this tool can be used :: Ensure that "depot_tools" is somewhere in PATH so this tool can be used
:: standalone, but allow other PATH manipulations to take priority. :: standalone, but allow other PATH manipulations to take priority.
set PATH=%PATH%;%~dp0 set PATH=%PATH%;%~dp0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment