forgejo-sdk/Makefile

34 lines
593 B
Makefile
Raw Normal View History

2016-11-07 12:41:57 +00:00
.PHONY: all
all: clean test build
.PHONY: clean
clean:
go clean -i ./...
.PHONY: fmt
fmt:
2017-08-22 18:20:39 +01:00
find . -name "*.go" -type f ! -path "./vendor/*" ! -path "./benchmark/*" | xargs gofmt -s -w
2016-11-07 12:41:57 +00:00
.PHONY: vet
vet:
2019-09-15 15:27:08 +01:00
cd gitea && go vet ./...
2016-11-07 12:41:57 +00:00
.PHONY: lint
lint:
@which golint > /dev/null; if [ $$? -ne 0 ]; then \
2018-10-18 03:15:43 +01:00
go get -u golang.org/x/lint/golint; \
2016-11-07 12:41:57 +00:00
fi
2019-09-15 15:27:08 +01:00
cd gitea && golint -set_exit_status
2016-11-07 12:41:57 +00:00
.PHONY: test
test:
2019-09-15 15:27:08 +01:00
cd gitea && go test -cover -coverprofile coverage.out
2016-11-07 12:41:57 +00:00
2017-08-22 18:20:39 +01:00
.PHONY: bench
bench:
2019-09-15 15:27:08 +01:00
cd gitea && go test -run=XXXXXX -benchtime=10s -bench=. || exit 1
2017-08-22 18:20:39 +01:00
2016-11-07 12:41:57 +00:00
.PHONY: build
build:
2019-09-15 15:27:08 +01:00
cd gitea && go build