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

LICENSE="$(cat LICENSE)"

version="$(git log --format="%h %d" -1)
$(go version)
Build Date: $(date)
Commit Author: $(git log --format="%an" -1)
Commit date: $(git log --format="%aD" -1)

Source code can be found here:
https://git.riedstra.dev/mitch/deduplicator

$LICENSE"

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

export CGO_ENABLED=0

go build -ldflags="-X 'main.VersionString=$version'" -o deduplicator main.go