diff options
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..de7f434 --- /dev/null +++ b/build.sh @@ -0,0 +1,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 |
