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

Unified Diff: tools/make_version.py

Issue 884523003: Add support for ignoring the svn revision when getting the version, use this for gn build (Closed) Base URL: https://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') | tools/utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/make_version.py
diff --git a/tools/make_version.py b/tools/make_version.py
index 925e3a6010f705a1952d07f06c4d658db087ed2b..cf96fe2130baa95af1f5d9ff7717a961b52f36a9 100644
--- a/tools/make_version.py
+++ b/tools/make_version.py
@@ -35,8 +35,8 @@ VM_SNAPSHOT_FILES=[
'symbols.cc',
]
-def makeVersionString(quiet):
- version_string = utils.GetVersion()
+def makeVersionString(quiet, no_svn):
+ version_string = utils.GetSemanticSDKVersion(ignore_svn_revision=no_svn)
if not quiet:
debugLog("Returning version string: %s " % version_string)
return version_string
@@ -51,9 +51,9 @@ def makeSnapshotHashString():
return vmhash.hexdigest()
-def makeFile(quiet, output_file, input_file):
+def makeFile(quiet, output_file, input_file, ignore_svn_revision):
version_cc_text = open(input_file).read()
- version_string = makeVersionString(quiet)
+ version_string = makeVersionString(quiet, ignore_svn_revision)
version_cc_text = version_cc_text.replace("{{VERSION_STR}}",
version_string)
version_time = time.ctime(time.time())
@@ -73,6 +73,9 @@ def main(args):
parser.add_option("-q", "--quiet",
action="store_true", default=False,
help="disable console output")
+ parser.add_option("--ignore_svn_revision",
+ action="store_true", default=False,
+ help="Don't try to determine svn revision")
parser.add_option("--output",
action="store", type="string",
help="output file name")
@@ -92,7 +95,8 @@ def main(args):
for arg in args:
files.append(arg)
- if not makeFile(options.quiet, options.output, options.input):
+ if not makeFile(options.quiet, options.output, options.input,
+ options.ignore_svn_revision):
return -1
return 0
« no previous file with comments | « runtime/BUILD.gn ('k') | tools/utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698