diff options
| author | Mitch Riedstra <mitch@riedstra.us> | 2020-10-25 16:58:57 -0400 |
|---|---|---|
| committer | Mitch Riedstra <mitch@riedstra.us> | 2020-10-25 16:58:57 -0400 |
| commit | 5640cbe7d1433ff9a7a903f961d6f963c5880080 (patch) | |
| tree | b1c743c5588f29109aef9e9668bd20d398dda758 /build.sh | |
| parent | 7752715a53155e4809f91e5894dfb2e9b3d35544 (diff) | |
| download | deduplicator-5640cbe7d1433ff9a7a903f961d6f963c5880080.tar.gz deduplicator-5640cbe7d1433ff9a7a903f961d6f963c5880080.tar.xz | |
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 |
