#!/bin/bash
set -e

source $(dirname $0)/version

cd $(dirname $0)/..

mkdir -p bin
[ "$(uname)" != "Darwin" ] && LINKFLAGS="-extldflags -static -s"
CGO_ENABLED=0 go build -ldflags "-X github.com/k3s-io/helm-controller/pkg/version.Version=$VERSION $LINKFLAGS" -o bin/helm-controller
