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

Unified Diff: tools/make_version.py

Issue 850053005: Disables printing a version string to the console for GN build. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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 | « runtime/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/make_version.py
===================================================================
--- tools/make_version.py (revision 43028)
+++ tools/make_version.py (working copy)
@@ -35,9 +35,10 @@
'symbols.cc',
]
-def makeVersionString():
+def makeVersionString(quiet):
version_string = utils.GetVersion()
- debugLog("Returning version string: %s " % version_string)
+ if not quiet:
+ debugLog("Returning version string: %s " % version_string)
return version_string
@@ -50,9 +51,9 @@
return vmhash.hexdigest()
-def makeFile(output_file, input_file):
+def makeFile(quiet, output_file, input_file):
version_cc_text = open(input_file).read()
- version_string = makeVersionString()
+ version_string = makeVersionString(quiet)
version_cc_text = version_cc_text.replace("{{VERSION_STR}}",
version_string)
version_time = time.ctime(time.time())
@@ -69,6 +70,9 @@
try:
# Parse input.
parser = OptionParser()
+ parser.add_option("-q", "--quiet",
+ action="store_true", default=False,
+ help="disable console output")
parser.add_option("--output",
action="store", type="string",
help="output file name")
@@ -88,7 +92,7 @@
for arg in args:
files.append(arg)
- if not makeFile(options.output, options.input):
+ if not makeFile(options.quiet, options.output, options.input):
return -1
return 0
« no previous file with comments | « runtime/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698