balena-supervisor/build_gosuper.sh
Pablo Carranza Vélez 513cc24d1c Purge restarts app, and first attempt at integration testing
* Restart app when purging
* Use log.Fatal to exit with status 1
* Quotes in entry.sh
* Use JSON for request body
* Handle errors for parseJsonBody
* Better error printing in main
* First attempt at testing nodesuper from Go
* Cleaner build
* Use ARCH to differentiate concurrent tests/builds
* Use --rm to autoremove containers
2015-10-13 13:43:36 -03:00

14 lines
316 B
Bash

#!/bin/bash
go install -a -v ./gosuper
RETURN_VALUE=$?
# For consistency, always keep the binary within a linux_$GOARCH folder
if [ $GOARCH == "amd64" ]; then
mkdir $GOPATH/bin/linux_$GOARCH || true
cp $GOPATH/bin/gosuper $GOPATH/bin/linux_$GOARCH/
fi
chown -R $USER_ID:$GROUP_ID $GOPATH/bin
exit $RETURN_VALUE