2019-06-18 17:46:37 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Copyright 2019 Google, LLC
|
|
|
|
#
|
|
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
|
|
# found in the LICENSE file.
|
|
|
|
|
|
|
|
set -x -e
|
|
|
|
|
|
|
|
export GOCACHE="$(pwd)/cache/go_cache"
|
|
|
|
export GOPATH="$(pwd)/cache/gopath"
|
|
|
|
export GOROOT="$(pwd)/go/go"
|
|
|
|
|
|
|
|
cd skia
|
|
|
|
|
|
|
|
# Build task drivers from the infra repo.
|
|
|
|
export GOBIN="${1}"
|
2020-01-08 14:21:49 +00:00
|
|
|
git init
|
|
|
|
git remote add origin https://skia.googlesource.com/skia.git
|
|
|
|
git add .
|
2021-01-29 16:05:41 +00:00
|
|
|
git commit -a -m "initial commit to make go modules work"
|
2020-01-08 14:21:49 +00:00
|
|
|
export GOFLAGS="-mod=readonly"
|
|
|
|
go mod download
|
2019-12-17 19:54:42 +00:00
|
|
|
go install -v go.skia.org/infra/infra/bots/task_drivers/build_push_docker_image
|
2019-12-26 15:33:32 +00:00
|
|
|
go install -v go.skia.org/infra/infra/bots/task_drivers/push_apps_from_skia_image
|
|
|
|
go install -v go.skia.org/infra/infra/bots/task_drivers/push_apps_from_wasm_image
|
2019-06-18 17:46:37 +00:00
|
|
|
go install -v go.skia.org/infra/infra/bots/task_drivers/update_go_deps
|
2020-04-28 11:14:22 +00:00
|
|
|
|
2021-02-01 10:46:41 +00:00
|
|
|
goos=$2
|
|
|
|
goarch=$3
|
|
|
|
if [ "$goos" == "windows" ]; then suffix=".exe"; else suffix=""; fi
|
|
|
|
|
2020-04-28 11:14:22 +00:00
|
|
|
# Build task drivers from this repo.
|
|
|
|
task_drivers_dir=infra/bots/task_drivers
|
|
|
|
for td in $(cd ${task_drivers_dir} && ls); do
|
2021-02-01 10:46:41 +00:00
|
|
|
CGO_ENABLED=0 GOARCH=$goarch GOOS=$goos go build -o ${1}/${td}${suffix} ${task_drivers_dir}/${td}/${td}.go
|
2020-04-28 11:14:22 +00:00
|
|
|
done
|