From 6d19a8bdb5a58b5ec546ef3fbf3bc4fe93756170 Mon Sep 17 00:00:00 2001 From: mudler Date: Sun, 2 Jul 2023 11:14:09 +0200 Subject: [PATCH] fix: copy git to correctly display version in /version --- Dockerfile | 2 ++ Makefile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6e21da3..1c0685a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -83,6 +83,8 @@ RUN make get-sources COPY go.mod . RUN make prepare COPY . . +COPY .git . + RUN ESPEAK_DATA=/build/lib/Linux-$(uname -m)/piper_phonemize/lib/espeak-ng-data make build ################################### diff --git a/Makefile b/Makefile index d25ce75..88910e0 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ STABLEDIFFUSION_VERSION?=d89260f598afb809279bc72aa0107b4292587632 GO_TAGS?= BUILD_ID?=git -VERSION?=$(shell git describe --always --tags --dirty || echo "dev" ) +VERSION?=$(shell git describe --always --tags || echo "dev" ) # go tool nm ./local-ai | grep Commit LD_FLAGS?= override LD_FLAGS += -X "github.com/go-skynet/LocalAI/internal.Version=$(VERSION)"