2022-03-10 17:31:29 +01:00
|
|
|
LINT_ARGS ?= ./...
|
|
|
|
DESTDIR ?= "/usr/local"
|
|
|
|
|
|
|
|
bin:
|
2022-03-24 00:49:23 +01:00
|
|
|
GOOS=linux go build -o bin/templater-linux cmd/templater.go
|
2022-03-10 17:31:29 +01:00
|
|
|
upx bin/templater-linux
|
2022-03-24 00:49:23 +01:00
|
|
|
upx bin/templaster-server
|
2022-03-10 17:31:29 +01:00
|
|
|
|
|
|
|
install:
|
|
|
|
cp bin/templater-linux $(DESTDIR)/bin/templater
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm $(DESTDIR)/bin/templater
|
|
|
|
|
|
|
|
|
|
|
|
test: tidy
|
|
|
|
go clean -testcache
|
|
|
|
go test -mod=vendor -v ./...
|
|
|
|
|
|
|
|
lint:
|
|
|
|
golangci-lint run -e '.*/pkg/mod' -e ".*/go/src" --enable-all --disable lll $(LINT_ARGS)
|
|
|
|
|
|
|
|
tidy:
|
|
|
|
go mod tidy
|
|
|
|
|
|
|
|
vendor: tidy
|
|
|
|
go mod vendor
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf ./bin
|
|
|
|
go clean -i -x -r -modcache
|
|
|
|
|
|
|
|
watch:
|
|
|
|
modd
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: clean generate vendor lint watch tidy bin/templater
|