forked from lgtmco/lgtm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
30 lines (21 loc) · 926 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
PACKAGES = $(shell go list ./... | grep -v /vendor/)
all: build
deps:
go get -u github.com/jteeuwen/go-bindata/...
go get -u github.com/elazarl/go-bindata-assetfs/...
go get -u github.com/vektra/mockery/...
gen: gen_assets gen_mocks gen_migration
gen_assets:
go generate github.com/lgtmco/lgtm/web/static
go generate github.com/lgtmco/lgtm/web/template
gen_mocks:
go generate github.com/lgtmco/lgtm/store
go generate github.com/lgtmco/lgtm/remote
gen_migration:
go generate github.com/lgtmco/lgtm/store/migration
build:
go build --ldflags '-extldflags "-static" -X github.com/lgtmco/lgtm/version.VersionDev=$(CI_BUILD_NUMBER)' -o lgtm
test:
@for PKG in $(PACKAGES); do go test -v -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG; done;
test_mysql:
DATABASE_DRIVER="mysql" DATABASE_DATASOURCE="root@tcp(127.0.0.1:3306)/test?parseTime=true" go test -v -cover github.com/lgtmco/lgtm/store/datastore