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

Side by Side Diff: mojo/public/tools/dart_snapshotter.py

Issue 1607613007: Regenerate .mojo file if any dependent .dart sources change (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 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
« no previous file with comments | « mojo/public/dart/rules.gni ('k') | no next file » | 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 2015 The Chromium Authors. All rights reserved. 2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import argparse 6 import argparse
7 import subprocess 7 import subprocess
8 import sys 8 import sys
9 import os 9 import os
10 10
11 def main(): 11 def main():
12 parser = argparse.ArgumentParser(description='Snapshots Mojo applications') 12 parser = argparse.ArgumentParser(description='Snapshots Mojo applications')
13 parser.add_argument('executable', type=str) 13 parser.add_argument('executable', type=str)
14 parser.add_argument('main', type=str) 14 parser.add_argument('main', type=str)
15 parser.add_argument('--package-root', type=str) 15 parser.add_argument('--package-root', type=str)
16 parser.add_argument('--snapshot', type=str) 16 parser.add_argument('--snapshot', type=str)
17 parser.add_argument('--depfile', type=str)
18 parser.add_argument('--build-output', type=str)
17 19
18 args = parser.parse_args() 20 args = parser.parse_args()
19 if not os.path.isfile(args.executable): 21 if not os.path.isfile(args.executable):
20 print "file not found: " + args.executable 22 print "file not found: " + args.executable
21 return subprocess.check_call([ 23 return subprocess.check_call([
22 args.executable, 24 args.executable,
23 args.main, 25 args.main,
24 '--package-root=%s' % args.package_root, 26 '--package-root=%s' % args.package_root,
25 '--snapshot=%s' % args.snapshot, 27 '--snapshot=%s' % args.snapshot,
28 '--depfile=%s' % args.depfile,
29 '--build-output=%s' % args.build_output,
26 ]) 30 ])
27 31
28 if __name__ == '__main__': 32 if __name__ == '__main__':
29 sys.exit(main()) 33 sys.exit(main())
OLDNEW
« no previous file with comments | « mojo/public/dart/rules.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698