-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
24 lines (16 loc) · 996 Bytes
/
Makefile
File metadata and controls
24 lines (16 loc) · 996 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
BINARY=dkconf
EXAMPLES=$(shell find examples/* -type d -exec sh -c '(ls -p "{}"|grep />/dev/null)||echo "{}"' \;)
.PHONY: all examples
all:
go build -o ${BINARY}-osx main.go
env GOOS=linux GOARCH=amd64 go build -o ${BINARY}-linux main.go
test:
go test -v ./...
get:
go get
examples:
-@$(foreach test,$(EXAMPLES),(echo "\033[0;33mdkconf < ${test}\033[0m" && (source $(test)/.env && echo "\033[0;31m\c" && go run main.go -p TEST -s $(test)/template.tmpl | diff $(test)/expected.txt -) ; echo "\033[0m\c"); )
examples-linux:
-@$(foreach test,$(EXAMPLES),(echo "\033[0;33mdkconf < ${test}\033[0m" && (source $(test)/.env && echo "\033[0;31m\c" && ./dkconf-linux -p TEST -s $(test)/template.tmpl | diff $(test)/expected.txt -) ; echo "\033[0m\c"); )
examples-osx:
-@$(foreach test,$(EXAMPLES),(echo "\033[0;33mdkconf < ${test}\033[0m" && (source $(test)/.env && echo "\033[0;31m\c" && ./dkconf-osx -p TEST -s $(test)/template.tmpl | diff $(test)/expected.txt -) ; echo "\033[0m\c"); )