Merged in feature/expose-version (pull request #186)

expose version to api

* expose version
This commit is contained in:
Jay Brown
2025-09-19 19:18:37 +00:00
parent a6e081e5cd
commit c9eef574c0
4 changed files with 95 additions and 7 deletions
+2 -1
View File
@@ -36,6 +36,7 @@ ENV CC=musl-gcc
ARG GIT_VERSION=dev
ARG GIT_COMMIT=unknown
ARG BUILD_TIME=unknown
# Build with debug symbols (remove -s -w flags)
RUN go build \
@@ -44,7 +45,7 @@ RUN go build \
-trimpath \
-installsuffix cgo \
-gcflags="all=-N -l" \
-ldflags "-linkmode external -extldflags '-static -Wl,--as-needed -Wl,--gc-sections -Wl,-O1' -X main.version=${GIT_VERSION} -X main.gitCommit=${GIT_COMMIT}" \
-ldflags "-linkmode external -extldflags '-static -Wl,--as-needed -Wl,--gc-sections -Wl,-O1' -X queryorchestration/internal/serviceconfig/build.version=${GIT_VERSION} -X queryorchestration/internal/serviceconfig/build.gitCommit=${GIT_COMMIT} -X queryorchestration/internal/serviceconfig/build.buildTime=${BUILD_TIME}" \
-o bin/ ./cmd/...
FROM golang:${GO_VERSION}-alpine AS final