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

Side by Side Diff: tools/write_revision_file.py

Issue 2826793002: [Fuchsia] Build only the parts of the SDK that are needed (Closed)
Patch Set: Back out bad fix Created 3 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
« no previous file with comments | « tools/create_sdk.py ('k') | tools/write_version_file.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 #!/usr/bin/env python
2 # Copyright (c) 2017, 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 argparse
7 import os
8 import sys
9 import utils
10
11 def ParseArgs(args):
12 args = args[1:]
13 parser = argparse.ArgumentParser(
14 description='A script to write the version string to a file')
15
16 parser.add_argument('--output', '-o',
17 type=str,
18 required=True,
19 help='File to write')
20
21 return parser.parse_args(args)
22
23
24 def Main(argv):
25 args = ParseArgs(argv)
26 revision = utils.GetGitRevision()
27 if revision is not None:
28 with open(args.output, 'w') as f:
29 f.write('%s\n' % revision)
30 return 0
31
32
33 if __name__ == '__main__':
34 sys.exit(Main(sys.argv))
OLDNEW
« no previous file with comments | « tools/create_sdk.py ('k') | tools/write_version_file.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698