summaryrefslogtreecommitdiff
path: root/tools/gyp/PRESUBMIT.py
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2013-03-24 14:29:17 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2013-03-24 15:03:09 +0100
commit8632af381e7086823db764f815cbee53681d450b (patch)
tree84c752dbe7c2adb53a567087ac995383fb3e3935 /tools/gyp/PRESUBMIT.py
parent329b5388ba5a74aa3c4a7e142ba33510e4282cc1 (diff)
downloadandroid-node-v8-8632af381e7086823db764f815cbee53681d450b.tar.gz
android-node-v8-8632af381e7086823db764f815cbee53681d450b.tar.bz2
android-node-v8-8632af381e7086823db764f815cbee53681d450b.zip
tools: update gyp to r1601
Among other things, this should make it easier for people to build node.js on openbsd.
Diffstat (limited to 'tools/gyp/PRESUBMIT.py')
-rw-r--r--tools/gyp/PRESUBMIT.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/gyp/PRESUBMIT.py b/tools/gyp/PRESUBMIT.py
index 0338fb4a96..65235661a4 100644
--- a/tools/gyp/PRESUBMIT.py
+++ b/tools/gyp/PRESUBMIT.py
@@ -75,13 +75,20 @@ def CheckChangeOnUpload(input_api, output_api):
def CheckChangeOnCommit(input_api, output_api):
report = []
+
+ # Accept any year number from 2009 to the current year.
+ current_year = int(input_api.time.strftime('%Y'))
+ allowed_years = (str(s) for s in reversed(xrange(2009, current_year + 1)))
+ years_re = '(' + '|'.join(allowed_years) + ')'
+
+ # The (c) is deprecated, but tolerate it until it's removed from all files.
license = (
- r'.*? Copyright \(c\) %(year)s Google Inc\. All rights reserved\.\n'
+ r'.*? Copyright (\(c\) )?%(year)s Google Inc\. All rights reserved\.\n'
r'.*? Use of this source code is governed by a BSD-style license that '
r'can be\n'
r'.*? found in the LICENSE file\.\n'
) % {
- 'year': input_api.time.strftime('%Y'),
+ 'year': years_re,
}
report.extend(input_api.canned_checks.PanProjectChecks(
@@ -106,4 +113,4 @@ def CheckChangeOnCommit(input_api, output_api):
def GetPreferredTrySlaves():
- return ['gyp-win32', 'gyp-win64', 'gyp-linux', 'gyp-mac']
+ return ['gyp-win32', 'gyp-win64', 'gyp-linux', 'gyp-mac', 'gyp-android']