aboutsummaryrefslogtreecommitdiff
path: root/build.sh
blob: 2a92868991f182fab175981e72055ac9fef8bcb5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
set -e

LICENSE="$(cat LICENSE)"

version="$(git log --format="%h %d" -1)
$(go version)
Build Date: $(date +%m.%d.%Y)
Source code can be found here:
https://git.riedstra.dev/go/checkup

$LICENSE"

if ! git diff-index --quiet HEAD ; then
	version="dirty: $version"
fi

export CGO_ENABLED=0

go build -o checkup -ldflags="-X 'main.Version=$version'" ./cmd/main