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

Side by Side Diff: tools/generate_version_cc.py

Issue 1649703002: Update project authors statements to Dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « tools/fletchc_blaze.dart ('k') | tools/gyp-windows.bat » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file 2 # Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 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.md file. 4 # BSD-style license that can be found in the LICENSE.md file.
5 5
6 import os 6 import os
7 import sys 7 import sys
8 import utils 8 import utils
9 9
10 version_cc_template = """\ 10 version_cc_template = """\
11 // Copyright (c) 2015, the Fletch project authors. Please see the AUTHORS file 11 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
12 // for details. All rights reserved. Use of this source code is governed by a 12 // for details. All rights reserved. Use of this source code is governed by a
13 // BSD-style license that can be found in the LICENSE.md file. 13 // BSD-style license that can be found in the LICENSE.md file.
14 14
15 #include "src/shared/version.h" 15 #include "src/shared/version.h"
16 16
17 namespace fletch { 17 namespace fletch {
18 18
19 extern "C" 19 extern "C"
20 const char* GetVersion() { 20 const char* GetVersion() {
21 return "%(version)s"; 21 return "%(version)s";
22 } 22 }
23 23
24 } // namespace fletch 24 } // namespace fletch
25 """; 25 """;
26 26
27 27
28 def Main(): 28 def Main():
29 args = sys.argv[1:] 29 args = sys.argv[1:]
30 version_cc = args[2] 30 version_cc = args[2]
31 version = utils.GetSemanticSDKVersion() 31 version = utils.GetSemanticSDKVersion()
32 updated_content = version_cc_template % {"version": version} 32 updated_content = version_cc_template % {"version": version}
33 with open(version_cc, 'w') as f: 33 with open(version_cc, 'w') as f:
34 f.write(updated_content) 34 f.write(updated_content)
35 return 0 35 return 0
36 36
37 37
38 if __name__ == '__main__': 38 if __name__ == '__main__':
39 sys.exit(Main()) 39 sys.exit(Main())
OLDNEW
« no previous file with comments | « tools/fletchc_blaze.dart ('k') | tools/gyp-windows.bat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698