Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(369)

Unified Diff: build/ios/PRESUBMIT.py

Issue 2101243005: Add a snapshot of flutter/engine/src/build to our sdk (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add README.dart Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/ios/OWNERS ('k') | build/ios/chrome_ios.croc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/ios/PRESUBMIT.py
diff --git a/build/ios/PRESUBMIT.py b/build/ios/PRESUBMIT.py
new file mode 100644
index 0000000000000000000000000000000000000000..bbd17b3b1d2b4bd3cf844a7751a02e30247df091
--- /dev/null
+++ b/build/ios/PRESUBMIT.py
@@ -0,0 +1,42 @@
+# Copyright (c) 2012 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.
+
+import os
+
+"""Chromium presubmit script for src/tools/ios.
+
+See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
+for more details on the presubmit API built into depot_tools.
+"""
+
+WHITELIST_FILE = 'build/ios/grit_whitelist.txt'
+
+def _CheckWhitelistSorted(input_api, output_api):
+ for path in input_api.LocalPaths():
+ if WHITELIST_FILE == path:
+ lines = open(os.path.join('../..', WHITELIST_FILE)).readlines()
+ i = 0
+ while i < len(lines) - 1 and lines[i] <= lines[i + 1]:
+ i += 1
+ if i < len(lines) - 1:
+ return [output_api.PresubmitError(
+ 'The file ' + WHITELIST_FILE + ' must be sorted. ' +
+ 'First offending line: #' + str(i + 2))]
+ return []
+
+def _CommonChecks(input_api, output_api):
+ """Checks common to both upload and commit."""
+ results = []
+ results.extend(_CheckWhitelistSorted(input_api, output_api))
+ return results
+
+def CheckChangeOnUpload(input_api, output_api):
+ results = []
+ results.extend(_CommonChecks(input_api, output_api))
+ return results
+
+def CheckChangeOnCommit(input_api, output_api):
+ results = []
+ results.extend(_CommonChecks(input_api, output_api))
+ return results
« no previous file with comments | « build/ios/OWNERS ('k') | build/ios/chrome_ios.croc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698