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

Side by Side Diff: infra/bots/assets/go/create.py

Issue 2230853003: Package Go 1.6.2 in CIPD (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clean Created 4 years, 4 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 | « infra/bots/assets/go/common.py ('k') | infra/bots/assets/go/create_and_upload.py » ('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 # 2 #
3 # Copyright 2016 Google Inc. 3 # Copyright 2016 Google Inc.
4 # 4 #
5 # Use of this source code is governed by a BSD-style license that can be 5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file. 6 # found in the LICENSE file.
7 7
8 8
9 """Create the asset.""" 9 """Create the asset."""
10 10
11 11
12 import argparse 12 import argparse
13 import subprocess
13 14
15 GO_URL = "https://storage.googleapis.com/golang/go1.6.3.linux-amd64.tar.gz"
borenet 2016/08/10 14:40:29 Nit: 2 lines between top-level defs. This is Go 1
jcgregorio 2016/08/10 15:01:47 Yeah, 1.7 isn't listed as an available download on
14 16
15 def create_asset(target_dir): 17 def create_asset(target_dir):
16 """Create the asset.""" 18 """Create the asset."""
17 raise NotImplementedError('Implement me!') 19 subprocess.check_output("curl %s | tar -C %s -xzf -" % (GO_URL, target_dir), s hell=True)
borenet 2016/08/10 14:40:29 Can we download and untar separately so that we ca
jcgregorio 2016/08/10 15:01:47 Done.
18 20
19 21
20 def main(): 22 def main():
21 parser = argparse.ArgumentParser() 23 parser = argparse.ArgumentParser()
22 parser.add_argument('--target_dir', '-t', required=True) 24 parser.add_argument('--target_dir', '-t', required=True)
23 args = parser.parse_args() 25 args = parser.parse_args()
24 create_asset(args.target_dir) 26 create_asset(args.target_dir)
25 27
26 28
27 if __name__ == '__main__': 29 if __name__ == '__main__':
28 main() 30 main()
OLDNEW
« no previous file with comments | « infra/bots/assets/go/common.py ('k') | infra/bots/assets/go/create_and_upload.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698