templatefile/Makefile

40 lines
755 B
Makefile
Raw Normal View History

LINT_ARGS ?= ./...
DESTDIR ?= "/usr/local"
bin:
2022-06-27 15:58:37 +02:00
GOOS=linux CGO_ENABLED=0 go build -o bin/templater-linux cmd/templater/main.go
GOOS=linux CGO_ENABLED=0 go build -o bin/bootstraper-linux cmd/bootstraper/main.go
upx bin/templater-linux
2022-06-27 15:58:37 +02:00
upx bin/bootstraper-linux
install:
cp bin/templater-linux $(DESTDIR)/bin/templater
cp bin/bootstraper-linux $(DESTDIR)/bin/bootstraper
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