OLD | NEW |
---|---|
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 """Builds the AppRTC collider using the golang toolchain. | 6 """Builds the AppRTC collider using the golang toolchain. |
7 | 7 |
8 The golang toolchain is downloaded by download_golang.py. We use that here | 8 The golang toolchain is downloaded by download_golang.py. We use that here |
9 to build the AppRTC collider server. | 9 to build the AppRTC collider server. |
10 """ | 10 """ |
(...skipping 27 matching lines...) Expand all Loading... | |
38 golang_env['PATH'] += os.pathsep + os.path.abspath('mercurial') | 38 golang_env['PATH'] += os.pathsep + os.path.abspath('mercurial') |
39 subprocess.check_call([golang_path, 'get', 'collidermain'], | 39 subprocess.check_call([golang_path, 'get', 'collidermain'], |
40 env=golang_env) | 40 env=golang_env) |
41 subprocess.check_call([golang_path, 'build', 'collidermain'], | 41 subprocess.check_call([golang_path, 'build', 'collidermain'], |
42 env=golang_env) | 42 env=golang_env) |
43 | 43 |
44 # Delete everything in the workspace except the build artifacts. | 44 # Delete everything in the workspace except the build artifacts. |
45 go_bin_dir = os.path.join(golang_workspace, 'bin') | 45 go_bin_dir = os.path.join(golang_workspace, 'bin') |
46 tmp_dir = tempfile.mkdtemp() | 46 tmp_dir = tempfile.mkdtemp() |
47 shutil.move(go_bin_dir, tmp_dir) | 47 shutil.move(go_bin_dir, tmp_dir) |
48 shutil.rmtree(golang_workspace) | 48 utils.RemoveDirectory(golang_workspace) |
49 os.makedirs(golang_workspace) | |
phoglund_chromium
2016/02/10 08:01:19
Oops! No, you're right, the move doesn't create di
| |
49 shutil.move(os.path.join(tmp_dir, 'bin'), go_bin_dir) | 50 shutil.move(os.path.join(tmp_dir, 'bin'), go_bin_dir) |
50 os.rmdir(tmp_dir) | 51 os.rmdir(tmp_dir) |
51 | 52 |
52 if __name__ == '__main__': | 53 if __name__ == '__main__': |
53 sys.exit(main()) | 54 sys.exit(main()) |
54 | 55 |
OLD | NEW |