build: modify gclient.py
with unified patch (#38351)
* build: modify gclient.py with unified patch * ci: ensure depot_tools does not update * ci: move auto-update disable outside if
This commit is contained in:
parent
e138f5f915
commit
b35ec4a23c
1 changed files with 19 additions and 6 deletions
|
@ -250,14 +250,27 @@ step-depot-tools-get: &step-depot-tools-get
|
||||||
sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
|
sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
|
||||||
# Remove swift-format dep from cipd on macOS until we send a patch upstream.
|
# Remove swift-format dep from cipd on macOS until we send a patch upstream.
|
||||||
cd depot_tools
|
cd depot_tools
|
||||||
patch gclient.py -R \<<'EOF'
|
cat > gclient.diff \<< 'EOF'
|
||||||
676,677c676
|
diff --git a/gclient.py b/gclient.py
|
||||||
< packages = dep_value.get('packages', [])
|
index 3a9c5c6..f222043 100755
|
||||||
< for package in (x for x in packages if "infra/3pp/tools/swift-format" not in x.get('package')):
|
--- a/gclient.py
|
||||||
---
|
+++ b/gclient.py
|
||||||
> for package in dep_value.get('packages', []):
|
@@ -712,7 +712,8 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
|
||||||
|
|
||||||
|
if dep_type == 'cipd':
|
||||||
|
cipd_root = self.GetCipdRoot()
|
||||||
|
- for package in dep_value.get('packages', []):
|
||||||
|
+ packages = dep_value.get('packages', [])
|
||||||
|
+ for package in (x for x in packages if "infra/3pp/tools/swift-format" not in x.get('package')):
|
||||||
|
deps_to_add.append(
|
||||||
|
CipdDependency(
|
||||||
|
parent=self,
|
||||||
EOF
|
EOF
|
||||||
|
git apply --3way gclient.diff
|
||||||
fi
|
fi
|
||||||
|
# Ensure depot_tools does not update.
|
||||||
|
test -d depot_tools && cd depot_tools
|
||||||
|
touch .disable_auto_update
|
||||||
|
|
||||||
step-depot-tools-add-to-path: &step-depot-tools-add-to-path
|
step-depot-tools-add-to-path: &step-depot-tools-add-to-path
|
||||||
run:
|
run:
|
||||||
|
|
Loading…
Add table
Reference in a new issue