Index: chrome/common/extensions/docs/server2/PRESUBMIT.py |
diff --git a/chrome/common/extensions/docs/server2/PRESUBMIT.py b/chrome/common/extensions/docs/server2/PRESUBMIT.py |
index dc3db5d5ae20df05cc79f156f13ce8d9f99e0f70..6ef5ebcf91858bde18da2a9d9b41d876ff727946 100644 |
--- a/chrome/common/extensions/docs/server2/PRESUBMIT.py |
+++ b/chrome/common/extensions/docs/server2/PRESUBMIT.py |
@@ -37,10 +37,43 @@ WHITELIST = [ r'.+_test.py$' ] |
# chrome/common/extensions. |
BLACKLIST = [ r'integration_test.py$' ] |
+def _WarnIfAppYamlHasntChanged(input_api, output_api): |
+ if any(path.endswith('app.yaml') for path in input_api.LocalPaths()): |
+ return [] |
+ return [output_api.PresubmitPromptOrNotify(''' |
+************************************************** |
+CHANGE DETECTED IN SERVER2 WITHOUT APP.YAML UPDATE |
+************************************************** |
+Maybe this is ok? Follow this simple guide: |
+ |
+Q: Does this change any data that might get stored? |
+ * Did you add/remove/update a field to a data source? |
+ * Did you add/remove/update some data that gets sent to templates? |
+ * Is this change to support a new feature in the templates? |
+ * Does this change include changes to templates? |
+Yes? Bump the middle version, i.e. 2-5-2 -> 2-6-2. |
+ THIS WILL CAUSE THE CURRENTLY RUNNING SERVER TO STOP UPDATING. |
+ PUSH THE NEW VERSION ASAP. |
+No? Continue. |
+ |
+Q: Is this a non-trivial change to the server? |
+Yes? Bump the end version, i.e. 2-5-2 -> 2-5-3. |
+No? Are you sure? How much do you bet? This can't be rolled back... |
方觉(Fang Jue)
2013/05/10 08:49:17
Different versions have separate object stores, wh
not at google - send to devlin
2013/05/10 17:49:58
Yep, this comment is *slightly* misleading. In a f
|
+ |
+Q: Is this a spelling correction? New test? Better comments? |
+Yes? Ok fine. Ignore this warning. |
+No? I guess this presubmit check doesn't work. |
+''')] |
+ |
+def _RunPresubmit(input_api, output_api): |
+ return ( |
+ _WarnIfAppYamlHasntChanged(input_api, output_api) + |
+ input_api.canned_checks.RunUnitTestsInDirectory( |
+ input_api, output_api, '.', whitelist=WHITELIST, blacklist=BLACKLIST) |
+ ) |
+ |
def CheckChangeOnUpload(input_api, output_api): |
- return input_api.canned_checks.RunUnitTestsInDirectory( |
- input_api, output_api, '.', whitelist=WHITELIST, blacklist=BLACKLIST) |
+ return _RunPresubmit(input_api, output_api) |
def CheckChangeOnCommit(input_api, output_api): |
- return input_api.canned_checks.RunUnitTestsInDirectory( |
- input_api, output_api, '.', whitelist=WHITELIST, blacklist=BLACKLIST) |
+ return _RunPresubmit(input_api, output_api) |