all: test fq .PHONY: fq fq: VERSION=$(shell git describe --all --long --dirty 2>/dev/null || echo nogit) fq: CGO_ENABLED=0 go build -ldflags "-s -w -X main.version=${VERSION}" -trimpath -o fq . .PHONY: test test: testgo testjq testcli .PHONY: testgo # figure out all go pakges with test files testgo: PKGS=$(shell find . -name "*_test.go" | xargs -n 1 dirname | sort | uniq) testgo: go test ${VERBOSE} ${COVER} ${PKGS} .PHONY: testgov testgov: export VERBOSE=-v testgov: testgo .PHONY: testjq testjq: fq @dev/testjq.sh ./fq pkg/interp/*_test.jq .PHONY: testcli testcli: fq @pkg/cli/test.sh ./fq pkg/cli/test.exp .PHONY: actual actual: export WRITE_ACTUAL=1 actual: testgo .PHONY: cover cover: COVER=-cover -race -coverpkg=./... -coverprofile=cover.out cover: test go tool cover -html=cover.out -o cover.out.html cat cover.out.html | grep '