aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2019-09-22 06:19:25 -0400
committerMitch Riedstra <mitch@riedstra.us>2019-09-22 06:19:25 -0400
commit7ea49a4869751f93172f276737d094e55121a08d (patch)
treed35af679e4efbccb21217d9401a396ba09c18e57 /build.sh
parente9a29c85c023e9a91027122bd361244db575d44b (diff)
downloadhook-1.0.tar.gz
hook-1.0.tar.xz
Add a build script, go mod file and update the readmev1.0
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..0f5b244
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -e
+set -x
+
+export CGO_ENABLED=0
+go build \
+ -o hook \
+ -ldflags '-X "main.versionString='"$(git log --pretty=format:"%D %h %an %aD" -n 1)"'"' \
+ main.go