diff options
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0aa8a8f --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +VERSION = $(shell git describe --tags) +BUILDTIME = $(shell date +%Y.%m.%d_%H%M) + +run: goimports build + ./go-clean --version + +vet: + @GO111MODULE=off go vet + @echo this go binary package builds okay + +no-gui: build + ./go-clean --no-gui + +build: goimports + GO111MODULE=off go build -v \ + -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" + +build-darwin: + GOOS=darwin GOARCH=amd64 GO111MODULE=off go build -v -o go-clean-darwin \ + -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" +build-windows: + GOOS=windows GOARCH=amd64 GO111MODULE=off go build -v go-clean.exe \ + -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" + +install: goimports + GO111MODULE=off go install \ + -ldflags "-X main.VERSION=${VERSION} -X main.BUILDTIME=${BUILDTIME} -X gui.GUIVERSION=${VERSION}" + +goimports: + reset + goimports -w *.go + # // to globally reset paths: + # // gofmt -w -r "go.wit.com/gui -> go.wit.com/gui/gui" . + +clean: + -rm go-clean |
