aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2024-07-27 15:40:57 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2024-07-27 15:40:57 -0700
commit09261d2b52fa739bb6321c866566223f11061201 (patch)
tree5f59ad0b0855595e3c4acc80cdd7a1291349f53f /Dockerfile
parent117c2040b807dfd3cc578e8b5ba07ce504b102fe (diff)
Fix missing version in Docker and Makefile build
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Dockerfile b/Dockerfile
index ee33b0e..f5b2af6 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,7 +3,7 @@ FROM golang:1.22 AS builder
WORKDIR /app
COPY . .
-RUN CGO_ENABLED=0 go build -o /app/server cmd/mobius-hotline-server/main.go && chmod a+x /app/server
+RUN CGO_ENABLED=0 go build -ldflags "-X main.version=$(git describe --exact-match --tags)" -o /app/server cmd/mobius-hotline-server/main.go && chmod a+x /app/server
FROM scratch