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

Side by Side Diff: dart/site/try/add_time_stamp.py

Issue 139513003: Add timestamp to AppCache manifest. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Implement Martin's suggestions. Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | dart/site/try/build_try.gyp » ('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 #!/usr/bin/env python
2 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file.
5
6 import datetime
7 import sys
8
9 def Main():
10 (_, input_file_name, output_file_name) = sys.argv
11 if not input_file_name or not output_file_name:
12 raise Exception('Missing argument')
13
14 timestamp = str(datetime.datetime.now())
15
16 with open(input_file_name, 'r') as input_file:
17 with open(output_file_name, 'w') as output_file:
18 output_file.write(input_file.read().replace('@@TIMESTAMP@@', timestamp))
19
20
21 if __name__ == '__main__':
22 sys.exit(Main())
OLDNEW
« no previous file with comments | « no previous file | dart/site/try/build_try.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698