balena-supervisor/gosuper/build.sh
Trong Nghia Nguyen 01c39f33b5 Fixes #511, add support for new supervisor image for x86 with quark cpu
boards.

Change-Type: minor
Signed-off-by: Trong Nghia Nguyen <nghiant2710@gmail.com>
2017-11-01 03:33:43 -07:00

39 lines
508 B
Bash

#!/bin/bash
set -o errexit
./test_formatting.sh
go test -v ./gosuper
case "$ARCH" in
'amd64')
export GOARCH=amd64
;;
'i386')
export GOARCH=386
;;
'i386-nlp')
export GOARCH=386
;;
'rpi')
export GOARCH=arm
export GOARM=6
;;
'armv7hf')
export GOARCH=arm
export GOARM=7
;;
'armel')
export GOARCH=arm
export GOARM=5
;;
'aarch64')
export GOARCH=arm64
;;
esac
go install -a -v ./gosuper \
&& cd /go/bin \
&& find -type f -name gosuper -exec mv {} /go/bin/gosuper \; \
&& upx --best /go/bin/gosuper