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

Side by Side Diff: dartium_tools/generate_dart_vm_version.py

Issue 239993009: Revert accidental dartium code push (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « dartium_tools/fetch_reference_build.py ('k') | dartium_tools/get_chromium_build.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 import datetime
2 import imp
3 import os
4 import subprocess
5 import sys
6 import time
7
8 utils = imp.load_source('utils', 'src/dart/tools/utils.py')
9
10
11 REVISION_FILE = 'src/chrome/browser/ui/webui/dartvm_revision.h'
12 EXPIRATION_FILE = 'src/third_party/WebKit/Source/bindings/dart/ExpirationTimeSec sSinceEpoch.time_t'
13
14 def updateFile(filename, content):
15 if os.path.exists(filename):
16 if file(filename, 'r').read() == content:
17 return
18 else:
19 dir = os.path.dirname(filename)
20 if not os.path.exists(dir):
21 os.makedirs(dir)
22 file(filename, 'w').write(content)
23
24 def main():
25 dart_version = utils.GetVersion()
26 version_string = '#define DART_VM_REVISION "%s"\n' % dart_version.strip()
27
28 updateFile(REVISION_FILE, version_string)
29
30 expiration_date = datetime.date.today() + datetime.timedelta(weeks=12)
31 updateFile(EXPIRATION_FILE, "%dLL\n" % time.mktime(expiration_date.timetuple() ))
32
33 if __name__ == '__main__':
34 main()
OLDNEW
« no previous file with comments | « dartium_tools/fetch_reference_build.py ('k') | dartium_tools/get_chromium_build.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698