Skip to content
This repository has been archived by the owner on Jan 26, 2018. It is now read-only.

Commit

Permalink
cleanup build script
Browse files Browse the repository at this point in the history
  • Loading branch information
bradrydzewski committed Apr 19, 2016
1 parent 4286ab3 commit 7de0561
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ build:
image: golang:1.6
commands:
- make deps
- make gen_assets gen_migration
- make test
dist:
image: golang:1.6
commands:
- make test_mysql
- make build
when:
Expand Down
12 changes: 9 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,24 @@ deps:
go get -u github.com/elazarl/go-bindata-assetfs/...
go get -u github.com/vektra/mockery/...

gen:
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
go generate github.com/lgtmco/lgtm/store

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 -cover -coverprofile $$GOPATH/src/$$PKG/coverage.out $$PKG; done;
@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
1 change: 0 additions & 1 deletion cache/mock/cache.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package mock

import "github.com/lgtmco/lgtm/cache"
import "github.com/stretchr/testify/mock"

type Cache struct {
Expand Down

0 comments on commit 7de0561

Please sign in to comment.