From 2c6dc806efb2443daa82948482b1b1e313936716 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 31 Dec 2024 13:03:06 -0600 Subject: Day 1. test build should work Signed-off-by: Jeff Carr --- Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4cc1786 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +VERSION = $(shell git describe --tags) +GUIVERSION = $(shell git describe --tags) +BUILDTIME = $(shell date +%s) + +all: build + +build: goimports + GO111MODULE=off go build -v -x \ + -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" + ./going2git -h + +vet: + GO111MODULE=off go vet + +goimports: + goimports -w *.go + # // to globally reset paths: + # // gofmt -w -r '"go.wit.com/gui/gadgets" -> "go.wit.com/lib/gadgets"' *.go + +install: goimports + GO111MODULE=off go install \ + -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" -- cgit v1.2.3