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

Unified 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: lint 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/bots/assets/go/create.py
diff --git a/infra/bots/assets/scripts/create.py b/infra/bots/assets/go/create.py
similarity index 58%
copy from infra/bots/assets/scripts/create.py
copy to infra/bots/assets/go/create.py
index 4f176085fbde447b9e5dca925f6c5e47fee08ef7..6ea94147e5043c458ab96a5b40841a37b4448b7e 100755
--- a/infra/bots/assets/scripts/create.py
+++ b/infra/bots/assets/go/create.py
@@ -10,11 +10,16 @@
import argparse
+import subprocess
+GO_URL = "https://storage.googleapis.com/golang/go1.6.3.linux-amd64.tar.gz"
def create_asset(target_dir):
"""Create the asset."""
- raise NotImplementedError('Implement me!')
+ p1 = subprocess.Popen(["curl", GO_URL], stdout=subprocess.PIPE)
+ p2 = subprocess.Popen(["tar", "-C", target_dir, "-xzf" "-"], stdin=p1.stdout)
+ p1.stdout.close() # Allow p1 to receive a SIGPIPE if p2 exits.
+ _,_ = p2.communicate()
def main():
« 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