adx-automation-agent/build

24 строки
804 B
Plaintext
Исходник Обычный вид История

#!/bin/bash
root=$(cd `dirname $0`; pwd)
2018-03-11 21:25:53 +03:00
version=$1
2018-02-19 23:47:57 +03:00
commit=${TRAVIS_COMMIT:-`git rev-parse --verify HEAD`}
2018-02-19 23:30:17 +03:00
echo "Version: ${version:=`date -u +local-%Y%m%d-%H%M%S`}"
2018-03-06 03:19:15 +03:00
export CGO_ENABLED=0
for os in linux; do # add darwin and windows in the future
export GOOS=$os
mkdir -p $root/bin/$os
2018-02-19 23:30:17 +03:00
echo -n "Building droid for $os ..."
go build -o $root/bin/$os/a01droid \
-ldflags "-X main.version=$version -X main.sourceCommit=$commit" \
github.com/Azure/adx-automation-agent/droid
go build -o $root/bin/$os/a01dispatcher \
-ldflags "-X main.version=$version -X main.sourceCommit=$commit" \
github.com/Azure/adx-automation-agent/dispatcher
2018-02-27 10:01:59 +03:00
chmod +x $root/bin/$os/a01droid
chmod +x $root/bin/$os/a01dispatcher
2018-02-19 23:30:17 +03:00
echo "Done."
done