route/build.sh

25 lines
464 B
Bash
Raw Normal View History

2017-04-29 20:11:36 +00:00
#!/bin/sh
2017-04-29 20:14:04 +00:00
set -e
set -x
2017-04-29 20:11:36 +00:00
dir="$(mktemp -d)"
plugdir="$dir/plugins"
githash="$(git rev-parse HEAD)"
wd="$(pwd)"
libc="glibc"
[[ -f "/lib/libc.musl-x86_64.so.1" ]] && libc="musl"
export GOBIN="$dir/bin"
go build git.xeserv.us/xena/route/cmd/...
go install git.xeserv.us/xena/route/cmd/...
go build -buildmode plugin -o $plugdir/autohttpagent.so git.xeserv.us/xena/route/plugins/autohttpagent
cd $dir
tar czf "$wd/route-$libc-$githash.tgz" *
cd $wd
rm -rf $dir