| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | # Copyright 2020 Google LLC. |
| 4 | # Use of this source code is governed by a BSD-style |
| 5 | # license that can be found in the LICENSE file. |
| 6 | |
| 7 | set -e -x |
| 8 | |
| 9 | cd $(dirnamescip-shell system . . dirname. $0)/../../.. |
| 10 | |
| 11 | tempdir=$(mktempscip-shell system . . mktemp. -d) |
| 12 | sudoscip-shell system . . sudo. apt-get update && sudoscip-shell system . . sudo. apt-get install -y jq |
| 13 | GOVERSION=$(curlscip-shell system . . curl. https://golang.org/dl/?mode=json | jqscip-shell system . . jq. ".[0].version" | sedscip-shell system . . sed. s/\"//g) && |
| 14 | curlscip-shell system . . curl. -o /tmp/go.tgzscip-shell filesystem . . `/tmp/go.tgz`. https://dl.google.com/go/${GOVERSION}.linux-amd64.tar.gz && |
| 15 | tarscip-shell system . . tar. -C $tempdir -xzf /tmp/go.tgzscip-shell filesystem . . `/tmp/go.tgz`. && |
| 16 | rmscip-shell system . . rm. /tmp/go.tgzscip-shell filesystem . . `/tmp/go.tgz`. && |
| 17 | export PATH=$tempdir/go/bin:$PATH && |
| 18 | export GOROOT=$tempdir/go |
| 19 | |
| 20 | goscip-shell system . . go. version |
| 21 | goscip-shell system . . go. env |
| 22 | |
| 23 | pushd google-api-go-generator |
| 24 | makescip-shell system . . make. all |
| 25 | popd |