version: Move version information into a separate package.

This will allow it to be accessed by other sections of the code.
This commit is contained in:
Alex Vandiver
2021-09-21 15:57:24 -07:00
parent 886499b4fb
commit 35b8f93502
6 changed files with 16 additions and 12 deletions

View File

@@ -3,7 +3,7 @@ FROM alpine:edge AS builder
COPY . /go/src/matterbridge
RUN apk --no-cache add go git \
&& cd /go/src/matterbridge \
&& CGO_ENABLED=0 go build -mod vendor -ldflags "-X main.githash=$(git log --pretty=format:'%h' -n 1)" -o /bin/matterbridge
&& CGO_ENABLED=0 go build -mod vendor -ldflags "-X github.com/42wim/matterbridge/version.GitHash=$(git log --pretty=format:'%h' -n 1)" -o /bin/matterbridge
FROM alpine
RUN apk --no-cache add ca-certificates mailcap