feat(templater): provides a simple tool to process templates
You can provide a go template (text/template) or a hcl2 template with a JSON representation of your configuration and this tool will print the generated "file" on stdout.
This commit is contained in:
36
Makefile
Normal file
36
Makefile
Normal file
@ -0,0 +1,36 @@
|
||||
LINT_ARGS ?= ./...
|
||||
DESTDIR ?= "/usr/local"
|
||||
|
||||
bin:
|
||||
GOOS=linux go build -o bin/templater-linux main.go
|
||||
upx bin/templater-linux
|
||||
|
||||
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
|
Reference in New Issue
Block a user