OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/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 """Invokes grunt build on AppRTC. | 6 """Invokes grunt build on AppRTC. |
7 | 7 |
8 The AppRTC javascript code must be closure-compiled. This script uses | 8 The AppRTC javascript code must be closure-compiled. This script uses |
9 the node toolchain we downloaded earlier. | 9 the node toolchain we downloaded earlier. |
10 """ | 10 """ |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 npm_bin = os.path.join(node_path, 'bin', 'npm') | 48 npm_bin = os.path.join(node_path, 'bin', 'npm') |
49 node_bin = os.path.join(node_path, 'bin', 'node') | 49 node_bin = os.path.join(node_path, 'bin', 'node') |
50 | 50 |
51 utils.RunSubprocessWithRetry([npm_bin, 'install']) | 51 utils.RunSubprocessWithRetry([npm_bin, 'install']) |
52 local_grunt_bin = os.path.join('node_modules', 'grunt-cli', 'bin', 'grunt') | 52 local_grunt_bin = os.path.join('node_modules', 'grunt-cli', 'bin', 'grunt') |
53 | 53 |
54 if not os.path.exists(local_grunt_bin): | 54 if not os.path.exists(local_grunt_bin): |
55 return ('Missing grunt-cli in the apprtc checkout; did ' | 55 return ('Missing grunt-cli in the apprtc checkout; did ' |
56 'npm install fail?') | 56 'npm install fail?') |
57 | 57 |
| 58 if utils.GetPlatform() is 'win': |
| 59 # https://github.com/webrtc/apprtc/issues/48 |
| 60 print 'grunt build is broken on win; cannot build apprtc' |
| 61 return |
58 utils.RunSubprocessWithRetry([node_bin, local_grunt_bin, 'build']) | 62 utils.RunSubprocessWithRetry([node_bin, local_grunt_bin, 'build']) |
59 | 63 |
60 | 64 |
61 if __name__ == '__main__': | 65 if __name__ == '__main__': |
62 sys.exit(main()) | 66 sys.exit(main()) |
OLD | NEW |