Disables printing a version string to the console for GN build.

R=ricow@google.com

Review URL: https://codereview.chromium.org//850053005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43041 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
zra@google.com 2015-01-21 15:18:23 +00:00
parent 30f1b97888
commit fe36ebadab
2 changed files with 10 additions and 5 deletions

View file

@ -73,6 +73,7 @@ action("generate_version_cc_file") {
script = "../tools/make_version.py"
args = [
"--quiet",
"--output", rebase_path(output, root_build_dir),
"--input", rebase_path("vm/version_in.cc", root_build_dir),
]

View file

@ -35,9 +35,10 @@ VM_SNAPSHOT_FILES=[
'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 @@ def makeSnapshotHashString():
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 @@ def main(args):
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 @@ def main(args):
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