summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index fde876f..9eca5e8 100644
--- a/Makefile
+++ b/Makefile
@@ -4,10 +4,17 @@ BUILDTIME = $(shell date +%Y.%m.%d)
all: build
./control-panel-droplet
-build:
+build: goimports vet
GO111MODULE=off go build \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
+goimports:
+ goimports -w *.go
+
+vet:
+ @GO111MODULE=off go vet
+ @echo this go binary package builds okay
+
verbose:
GO111MODULE=off go build -v -x \
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
@@ -17,10 +24,9 @@ install:
-ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}"
clean:
- -rm -f control-panel-droplet
+ -rm -f control-panel-droplet go.*
redomod:
- rm -f go.*
GO111MODULE= go mod init
GO111MODULE= go mod tidy