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

Side by Side Diff: tools/utils.py

Issue 2540383003: Don't store git commit in observatory version string (Closed)
Patch Set: Don't store git commit in observatory version string Created 4 years 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 unified diff | Download patch
« no previous file with comments | « tools/observatory_tool.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 # This file contains a set of utilities functions used by other Python-based 5 # This file contains a set of utilities functions used by other Python-based
6 # scripts. 6 # scripts.
7 7
8 import commands 8 import commands
9 import datetime 9 import datetime
10 import json 10 import json
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 if version.channel == 'be': 309 if version.channel == 'be':
310 postfix = '-edge' if ignore_svn_revision else '-edge.%s' % GetGitRevision() 310 postfix = '-edge' if ignore_svn_revision else '-edge.%s' % GetGitRevision()
311 elif version.channel == 'dev': 311 elif version.channel == 'dev':
312 postfix = '-dev.%s.%s' % (version.prerelease, version.prerelease_patch) 312 postfix = '-dev.%s.%s' % (version.prerelease, version.prerelease_patch)
313 else: 313 else:
314 assert version.channel == 'stable' 314 assert version.channel == 'stable'
315 postfix = '' 315 postfix = ''
316 316
317 return '%s.%s.%s%s' % (version.major, version.minor, version.patch, postfix) 317 return '%s.%s.%s%s' % (version.major, version.minor, version.patch, postfix)
318 318
319 def GetVersion(): 319 def GetVersion(ignore_svn_revision=False):
320 return GetSemanticSDKVersion() 320 return GetSemanticSDKVersion(ignore_svn_revision)
321 321
322 # The editor used to produce the VERSION file put on gcs. We now produce this 322 # The editor used to produce the VERSION file put on gcs. We now produce this
323 # in the bots archiving the sdk. 323 # in the bots archiving the sdk.
324 # The content looks like this: 324 # The content looks like this:
325 #{ 325 #{
326 # "date": "2015-05-28", 326 # "date": "2015-05-28",
327 # "version": "1.11.0-edge.131653", 327 # "version": "1.11.0-edge.131653",
328 # "revision": "535394c2657ede445142d8a92486d3899bbf49b5" 328 # "revision": "535394c2657ede445142d8a92486d3899bbf49b5"
329 #} 329 #}
330 def GetVersionFileContent(): 330 def GetVersionFileContent():
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 os.chdir(self._working_directory) 653 os.chdir(self._working_directory)
654 654
655 def __exit__(self, *_): 655 def __exit__(self, *_):
656 print "Enter directory = ", self._old_cwd 656 print "Enter directory = ", self._old_cwd
657 os.chdir(self._old_cwd) 657 os.chdir(self._old_cwd)
658 658
659 659
660 if __name__ == "__main__": 660 if __name__ == "__main__":
661 import sys 661 import sys
662 Main() 662 Main()
OLDNEW
« no previous file with comments | « tools/observatory_tool.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698