aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 12 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index c254292..da99711 100644
--- a/Makefile
+++ b/Makefile
@@ -7,14 +7,22 @@ all: build lulu
build: ${SRC} ${GEN}
go build
-${GEN}: ${SRC}
- go generate
+testcli: lulu cmd/lulu/test $(wildcard cmd/lulu/tests/*) $(wildcard cmd/lulu/testdata/*)
+ $(eval PATH=$(shell pwd):${PATH})
+ cd cmd/lulu && ./test
-lulu: ${SRC} $(wildcard cmd/lulu/*.go)
+${GEN}: .gen
+
+.gen: ${SRC}
+ go generate && touch $@
+
+lulu: ${SRC} ${GEN} $(wildcard cmd/lulu/*.go)
go build ./cmd/$@
spec.yml:
curl -L -o $@ 'https://api.lulu.com/api-docs/openapi-specs/openapi_public.yml'
clean:
- rm -f ${GEN} ${BIN}
+ cat .gitignore | xargs -I{} sh -c "rm -rf ./{}"
+
+.PHONY: testcli