From f71da2ef59a51788f32b5fe5eb600ce40dbbdd75 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Fri, 11 Oct 2024 22:39:19 -0500 Subject: still does nothing yet Signed-off-by: Jeff Carr --- Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 637952b..6d00510 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,17 @@ +VERSION = $(shell git describe --tags) + +# create the go.mod and go.sum if this is a brand new repo +# REDOMOD = $(shell if [ -e go.mod ]; then echo go.mod; else echo no go mod; fi) +REDOMOD = $(shell if [ -e go.sum ]; then echo go.sum exists; else GO111MODULE= go mod init; GO111MODULE= go mod tidy; fi) + all: - make redomod - GO111MODULE= go build - sudo ./virtigod + GO111MODULE=off go build -v -x -ldflags "-X main.Version=${VERSION} -X gui.GUIVERSION=${VERSION}" + ./virtigod --version + +# this is for release builds using the go.mod files +release-build: + @echo ${REDOMOD} + go build -v -ldflags "-X main.Version=${VERSION} -X gui.GUIVERSION=${VERSION}" # makes a .deb package debian: -- cgit v1.2.3