mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 10:41:31 +00:00
Don't call ensure_bootstrap from update_depot_tools. ensure_bootstrap also updates gsutil and all versions of pylint which is slow, particularly on MinGW. Original change's description: > depot_tools: Bootstrap Python 3 on Linux/Mac > > This will make it possible for developers to execute depot_tools > scripts using Python 3 in a known environment. > > Bug: 1002153 > Change-Id: I5ff492a49d227c1b5876f49adba020f51a575bdd > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1762664 > Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org> > Reviewed-by: Dirk Pranke <dpranke@chromium.org> > Reviewed-by: Andrii Shyshkalov <tandrii@google.com> Bug: 1002153 Change-Id: Ia7579e440438897ba4a7c65a8b228dcfe7f28c86 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1810040 Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org> Reviewed-by: Dirk Pranke <dpranke@chromium.org> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
54 lines
1.6 KiB
Bash
Executable File
54 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Copyright 2017 The Chromium Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
# This is a shell script to ensure that all of the "depot_tools" bootstrap
|
|
# programs are locally downloaded and ready for execution.
|
|
#
|
|
# Unlike "update_depot_tools", this script works with the current
|
|
# checkout, and will not update/sync the "depot_tools" repository.
|
|
#
|
|
# TODO: This duplicates logic in "update_depot_tools". Update that script to
|
|
# invoke this script instead of manually calling "cipd_bin_setup" and other
|
|
# operations.
|
|
|
|
# Test if this script is running under a MinGW install. If it is, we will
|
|
# hardcode the paths to Git where possible.
|
|
OUTPUT="$(uname | grep 'MINGW')"
|
|
MINGW=$?
|
|
|
|
if [ $MINGW = 0 ]; then
|
|
base_dir="${0%/*}"
|
|
else
|
|
base_dir=$(dirname "${BASH_SOURCE[0]}")
|
|
if [ -L "$base_dir" ]; then
|
|
base_dir=`cd "$base_dir" && pwd -P`
|
|
fi
|
|
|
|
# Don't bootstrap Python 3 on windows, since it is already done by
|
|
# bootstrap/win_tools.bat.
|
|
if [ "X$DEPOT_TOOLS_BOOTSTRAP_PYTHON3" != "X0" ]; then
|
|
source "$base_dir/bootstrap_python3"
|
|
bootstrap_python3
|
|
fi
|
|
fi
|
|
|
|
# Sync CIPD-boostrapped packages.
|
|
source "$base_dir/cipd_bin_setup.sh"
|
|
cipd_bin_setup
|
|
|
|
# Sync "gsutil.py".
|
|
python "$base_dir/gsutil.py" -- version 1> /dev/null
|
|
|
|
# Sync all the pylint versions.
|
|
for script in "$base_dir"/pylint-[0-9].[0-9]; do
|
|
# We have to silence stderr too because newer pylint versions will emit
|
|
# a spurious log to tell us what pylintrc file it's using. Ugh.
|
|
"$script" --version >/dev/null 2>&1
|
|
done
|
|
|
|
# Cleanup.
|
|
find "$base_dir" -iname "*.pyc" -delete || true
|