fix: version number not showing when run from docker image

This commit is contained in:
Evan Fiordeliso 2023-08-16 11:45:20 -04:00
parent 9c98c333ad
commit a68fcaf976
3 changed files with 10 additions and 8 deletions

View File

@ -18,11 +18,12 @@ RUN go mod download
COPY . . COPY . .
RUN go build \ RUN go build \
-ldflags="-X $VERSION_PKG.Version=$VERSION" \ -ldflags=" \
-ldflags="-X $VERSION_PKG.Build=$BUILD" \ -X $VERSION_PKG.Version=$VERSION \
-ldflags="-X $VERSION_PKG.BuildDate=$BUILD_DATE" \ -X $VERSION_PKG.Build=$BUILD \
-ldflags="-X \"$VERSION_PKG.BuiltBy=$BUILT_BY\"" \ -X $VERSION_PKG.BuildDate=$BUILD_DATE \
-o /ytdl-web . -X \"$VERSION_PKG.BuiltBy=$BUILT_BY\" \
" -o /ytdl-web .
FROM alpine:${ALPINE_VERSION} FROM alpine:${ALPINE_VERSION}

View File

@ -67,7 +67,7 @@
output=''${2:-type=docker} output=''${2:-type=docker}
docker-init docker-init
docker buildx build . \ PROGRESS_NO_TRUNC=1 docker buildx build . \
--tag $(docker-image):$VERSION \ --tag $(docker-image):$VERSION \
--tag $(docker-image):latest \ --tag $(docker-image):latest \
--platform $platform \ --platform $platform \
@ -76,6 +76,7 @@
--build-arg BUILD=$(build-id) \ --build-arg BUILD=$(build-id) \
--build-arg BUILD_DATE=$(build-date) \ --build-arg BUILD_DATE=$(build-date) \
--build-arg BUILT_BY="Devenv Script" \ --build-arg BUILT_BY="Devenv Script" \
--progress plain \
--output $output --output $output
''; '';

BIN
ytdl-web Executable file

Binary file not shown.