From 6d635543e2b8e90fd8a9e970cd9d6081acf88ef9 Mon Sep 17 00:00:00 2001 From: Joe Gregorio Date: Fri, 9 Apr 2021 08:45:45 -0400 Subject: [PATCH] Upgrade Go to 1.16.3. Change-Id: I2654ad43acd90d8a65dc2f54b47c0d9085e69175 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/394836 Reviewed-by: Eric Boren Commit-Queue: Joe Gregorio --- infra/bots/assets/go/VERSION | 2 +- infra/bots/assets/go/create.py | 15 +++++++++------ infra/bots/assets/go_win/VERSION | 2 +- infra/bots/assets/go_win/create.py | 2 +- infra/bots/tasks.json | 18 +++++++++--------- 5 files changed, 21 insertions(+), 18 deletions(-) diff --git a/infra/bots/assets/go/VERSION b/infra/bots/assets/go/VERSION index f11c82a4cb..da2d3988d7 100644 --- a/infra/bots/assets/go/VERSION +++ b/infra/bots/assets/go/VERSION @@ -1 +1 @@ -9 \ No newline at end of file +14 \ No newline at end of file diff --git a/infra/bots/assets/go/create.py b/infra/bots/assets/go/create.py index 5d5f6c6f1f..64930c72a3 100755 --- a/infra/bots/assets/go/create.py +++ b/infra/bots/assets/go/create.py @@ -10,20 +10,23 @@ import argparse +import common # pylint: disable=unused-import +import os import subprocess +import utils # Remember to also update the go_win asset when this is updated. -GO_URL = "https://dl.google.com/go/go1.15.linux-amd64.tar.gz" +GO_URL = "https://golang.org/dl/go1.16.3.linux-amd64.tar.gz" def create_asset(target_dir): """Create the asset.""" - 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() - + with utils.tmp_dir(): + cwd = os.getcwd() + zipfile = os.path.join(cwd, 'go.tar.gz') + subprocess.check_call(["wget", '-O', zipfile, GO_URL]) + subprocess.check_call(["tar", "-xzf", zipfile, "-C", target_dir]) def main(): parser = argparse.ArgumentParser() diff --git a/infra/bots/assets/go_win/VERSION b/infra/bots/assets/go_win/VERSION index d8263ee986..e440e5c842 100644 --- a/infra/bots/assets/go_win/VERSION +++ b/infra/bots/assets/go_win/VERSION @@ -1 +1 @@ -2 \ No newline at end of file +3 \ No newline at end of file diff --git a/infra/bots/assets/go_win/create.py b/infra/bots/assets/go_win/create.py index 8dc8905851..7ee0ec50a3 100755 --- a/infra/bots/assets/go_win/create.py +++ b/infra/bots/assets/go_win/create.py @@ -17,7 +17,7 @@ import utils # Remember to also update the go asset when this is updated. -GO_URL = "https://dl.google.com/go/go1.15.windows-amd64.zip" +GO_URL = "https://golang.org/dl/go1.16.3.windows-amd64.zip" def create_asset(target_dir): diff --git a/infra/bots/tasks.json b/infra/bots/tasks.json index 44322e588c..50c9eec62a 100755 --- a/infra/bots/tasks.json +++ b/infra/bots/tasks.json @@ -15638,7 +15638,7 @@ { "name": "skia/bots/go", "path": "go", - "version": "version:9" + "version": "version:14" } ], "command": [ @@ -15713,7 +15713,7 @@ { "name": "skia/bots/go", "path": "go", - "version": "version:9" + "version": "version:14" }, { "name": "skia/bots/protoc", @@ -15979,7 +15979,7 @@ { "name": "skia/bots/go", "path": "go", - "version": "version:9" + "version": "version:14" } ], "command": [ @@ -16044,7 +16044,7 @@ { "name": "skia/bots/go", "path": "go", - "version": "version:9" + "version": "version:14" } ], "command": [ @@ -16109,7 +16109,7 @@ { "name": "skia/bots/go", "path": "go", - "version": "version:9" + "version": "version:14" } ], "command": [ @@ -16260,7 +16260,7 @@ { "name": "skia/bots/go", "path": "go", - "version": "version:9" + "version": "version:14" } ], "command": [ @@ -16532,7 +16532,7 @@ { "name": "skia/bots/go", "path": "go", - "version": "version:9" + "version": "version:14" } ], "command": [ @@ -16640,7 +16640,7 @@ { "name": "skia/bots/go_win", "path": "go", - "version": "version:2" + "version": "version:3" } ], "command": [ @@ -17089,7 +17089,7 @@ { "name": "skia/bots/go", "path": "go", - "version": "version:9" + "version": "version:14" } ], "command": [