don't use the vendor build.sh file anymore and get rid of a git-version-tag related error

This commit is contained in:
Micha Gläß-Stöcker 2022-10-26 21:56:38 +02:00
parent 48d9c19d8c
commit f1d6ae9509

View file

@ -3,9 +3,9 @@ FROM golang:alpine AS build-env
RUN apk --no-cache add build-base git gcc RUN apk --no-cache add build-base git gcc
RUN cd /tmp; git clone https://github.com/ThomasLeister/prosody-filer.git RUN cd /tmp; git clone https://github.com/ThomasLeister/prosody-filer.git
RUN cd /tmp/prosody-filer; \ RUN cd /tmp/prosody-filer; \
VERSIONSTRING="$(git describe --tags --exact-match || git rev-parse --short HEAD)"; \ VERSIONSTRING="$(git describe --tags --exact-match 2> /dev/null || git rev-parse --short HEAD)"; \
echo "Building version ${VERSIONSTRING} of Prosody-Filer ..." \ echo "Building version ${VERSIONSTRING} of Prosody-Filer ..."; \
./build.sh CGO_ENABLED=0 GOOS=linux go build -a -ldflags "-extldflags '-static' -w -s -X main.versionString=${VERSIONSTRING}" prosody-filer.go;
# final stage # final stage
FROM alpine FROM alpine