Skip to content

Commit 6f0bc96

Browse files
authored
chore: remove v from go build version
1 parent e31a69f commit 6f0bc96

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

debian/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ RUN test -n "${ARCH}" || (echo "Error: ARCH is not set" && exit 1)
99

1010
COPY . /app
1111
WORKDIR /app
12-
RUN GOOS=linux GOARCH=${ARCH} go build -ldflags "-X 'main.Version=${VERSION}'" -o ${BINARY_NAME} ./cmd/${BINARY_NAME}
12+
RUN export VERSION=$(echo "${VERSION}" | sed -e "s/^v\(.*\)/\1/") && \
13+
GOOS=linux GOARCH=${ARCH} go build -ldflags "-X 'main.Version=${VERSION}'" -o ${BINARY_NAME} ./cmd/${BINARY_NAME}
1314

1415
FROM debian:bookworm AS debian
1516

0 commit comments

Comments
 (0)