From 9a51ce475eb9182a9ec6b292ae32a0e4ced16a9a Mon Sep 17 00:00:00 2001 From: Ramkumar Chinchani Date: Wed, 27 Oct 2021 22:28:59 +0000 Subject: [PATCH] version: fix commit version in binary So that "-v" reports the commit-id correctly. Signed-off-by: Ramkumar Chinchani --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e482ddc5..5c74a2ce 100644 --- a/Makefile +++ b/Makefile @@ -12,11 +12,11 @@ all: swagger binary binary-minimal debug test test-clean check .PHONY: binary-minimal binary-minimal: swagger - go build -tags minimal,containers_image_openpgp -v -ldflags "-X github.com/anuvu/zot/pkg/api.Commit=${COMMIT} -X github.com/anuvu/zot/pkg/api.BinaryType=minimal" -o bin/zot-minimal ./cmd/zot + go build -tags minimal,containers_image_openpgp -v -ldflags "-X github.com/anuvu/zot/pkg/api/config.Commit=${COMMIT} -X github.com/anuvu/zot/pkg/api.BinaryType=minimal" -o bin/zot-minimal ./cmd/zot .PHONY: binary binary: swagger - go build -tags extended,containers_image_openpgp -v -ldflags "-X github.com/anuvu/zot/pkg/api.Commit=${COMMIT} -X github.com/anuvu/zot/pkg/api.BinaryType=extended" -o bin/zot ./cmd/zot + go build -tags extended,containers_image_openpgp -v -ldflags "-X github.com/anuvu/zot/pkg/api/config.Commit=${COMMIT} -X github.com/anuvu/zot/pkg/api.BinaryType=extended" -o bin/zot ./cmd/zot .PHONY: debug debug: swagger