From 956d7cf3f31ea949a34537ff2f08a6b9f5918b6c Mon Sep 17 00:00:00 2001 From: Wim Date: Fri, 17 Feb 2017 22:32:42 +0100 Subject: Add githash to docker builds --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Dockerfile') diff --git a/Dockerfile b/Dockerfile index e2f54669..bcf173bd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,6 @@ RUN apk update && apk add go git gcc musl-dev ca-certificates \ && cd /go/src/github.com/42wim/matterbridge \ && export GOPATH=/go \ && go get \ - && go build -o /bin/matterbridge \ + && go build -x -ldflags "-X main.githash=$(git log --pretty=format:'%h' -n 1)" -o /bin/matterbridge \ && rm -rf /go \ && apk del --purge git go gcc musl-dev -- cgit v1.2.3