blob: befdbf23ee3d2650385c878b7828531fa37d0286 [file] [log] [blame]
# 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}"
git init
git remote add origin
git add .
git commit -a -m "initial commit to make go modules work"
export GOFLAGS="-mod=readonly"
go mod download
go install -v
go install -v
if [ "$goos" == "windows" ]; then suffix=".exe"; else suffix=""; fi
# Build task drivers from this repo.
for td in $(cd ${task_drivers_dir} && ls); do
CGO_ENABLED=0 GOARCH=$goarch GOOS=$goos go build -o ${1}/${td}${suffix} ${task_drivers_dir}/${td}/${td}.go