#!/bin/bash
set -e

source $(dirname $0)/version

cd $(dirname $0)/..

mkdir -p bin
[ "$(uname)" != "Darwin" ] && LINKFLAGS="-linkmode external -extldflags -static -s"
go build -ldflags "-X main.VERSION=$VERSION $LINKFLAGS" -o bin/go-rancher
