-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
46 lines (35 loc) · 1.16 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
.PHONY: build
build:
@mkdir -p bin
CGO_ENABLED=0 go build -v -o bin/tmpl8 .
test1:
cat test/input.json | go run . -v test/templates/* | tee test/input1.result
test2:
find test/templates -type f > test/files.lst
cat test/input.json | go run . @test/files.lst | tee test/input2.result
test3: build
find test/templates -type f > test/files.lst
echo k8s:default/tmpl8-demo >> test/files.lst
cat test/input.json | ./tmpl8 -v @test/files.lst | tee test/input2.result
install: build
cp bin/tmpl8 ~/bin
k8:
kubectl apply -k test/k8s
m-y:
go run . <test/m-input.yaml test/m-tmpl.yaml -v
m-j:
go run . -s <test/m-input.json test/m-tmpl.yaml -v
multi:
go run . -i test/m-input.yaml -i test/m-input.json test/m-tmpl.yaml -v -s
adv:
go run . -i test/advanced/input.yaml test/advanced/*.tmpl8 -v
check:
@echo "Checking...\n"
gocyclo -over 15 . || echo -n ""
@echo ""
golangci-lint run -E misspell -E depguard -E dupl -E goconst -E gocyclo -E predeclared -E tagliatelle -E errorlint -E godox -D structcheck
@echo ""
golint -min_confidence 0.21 -set_exit_status ./...
@echo "\nAll ok!"
release:
gh release create $(TAG) -t $(TAG)