Feat: Makefile adds target dependencies
This commit is contained in:
parent
cd21842fb6
commit
3282f94193
17
Makefile
17
Makefile
@ -11,22 +11,31 @@ ${BIN}: ${SRC}
|
||||
test:
|
||||
go test -modfile=go_test.mod -v -short -cover ./...
|
||||
|
||||
api:
|
||||
api: .go/bin/godoc2md
|
||||
@sed '/^## API$$/,$$d' -i README.md
|
||||
@echo '## API' >> README.md
|
||||
@godoc2md github.com/studio-b12/gowebdav | sed '/^$$/N;/^\n$$/D' |\
|
||||
@$< github.com/studio-b12/gowebdav | sed '/^$$/N;/^\n$$/D' |\
|
||||
sed '2d' |\
|
||||
sed 's/\/src\/github.com\/studio-b12\/gowebdav\//https:\/\/github.com\/studio-b12\/gowebdav\/blob\/master\//g' |\
|
||||
sed 's/\/src\/target\//https:\/\/github.com\/studio-b12\/gowebdav\/blob\/master\//g' |\
|
||||
sed 's/^#/##/g' >> README.md
|
||||
|
||||
check:
|
||||
check: .go/bin/gocyclo
|
||||
gofmt -w -s $(SRC)
|
||||
@echo
|
||||
gocyclo -over 15 .
|
||||
.go/bin/gocyclo -over 15 .
|
||||
@echo
|
||||
go vet -modfile=go_test.mod ./...
|
||||
|
||||
|
||||
.go/bin/godoc2md:
|
||||
@mkdir -p $(@D)
|
||||
@GOPATH="$(CURDIR)/.go" go install github.com/davecheney/godoc2md@latest
|
||||
|
||||
.go/bin/gocyclo:
|
||||
@mkdir -p $(@D)
|
||||
@GOPATH="$(CURDIR)/.go" go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
|
||||
|
||||
clean:
|
||||
@rm -f ${BIN}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user