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

Side by Side Diff: tools/dartium/generate_dart_vm_version.py

Issue 2976303002: Remove Dartium for TIP of origin/master (Closed)
Patch Set: Updated Created 3 years, 5 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
OLDNEW
(Empty)
1 import datetime
2 import imp
3 import os
4 import subprocess
5 import sys
6 import time
7
8 scriptpath = os.path.abspath(os.path.dirname(__file__))
9 utils = imp.load_source('utils', os.path.join(scriptpath, '..', 'utils.py'))
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(days=365)
31 updateFile(EXPIRATION_FILE,
32 "%dLL\n" % time.mktime(expiration_date.timetuple()))
33
34 if __name__ == '__main__':
35 main()
OLDNEW
« no previous file with comments | « tools/dartium/generate_app/generate_cached_patches.html ('k') | tools/dartium/generate_patches.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698