Browse Source

fill version correctly (#503)

pull/509/head
aler9 4 years ago
parent
commit
0f426c3d9d
  1. 4
      Makefile

4
Makefile

@ -197,7 +197,7 @@ release: @@ -197,7 +197,7 @@ release:
release-nodocker:
$(eval export CGO_ENABLED=0)
$(eval VERSION := $(shell git describe --tags))
$(eval GOBUILD := go build -ldflags '-X main.version=$(VERSION)')
$(eval GOBUILD := go build -ldflags '-X github.com/aler9/rtsp-simple-server/internal/core.version=$(VERSION)')
rm -rf tmp && mkdir tmp
rm -rf release && mkdir release
cp rtsp-simple-server.yml tmp/
@ -230,7 +230,7 @@ COPY . ./ @@ -230,7 +230,7 @@ COPY . ./
ARG VERSION
ARG OPTS
RUN export CGO_ENABLED=0 $${OPTS} \
&& go build -ldflags "-X main.version=$$VERSION" -o /rtsp-simple-server
&& go build -ldflags "-X github.com/aler9/rtsp-simple-server/internal/core.version=$$VERSION" -o /rtsp-simple-server
FROM scratch
COPY --from=build /rtsp-simple-server /

Loading…
Cancel
Save