Fix all dependencies in Gomfile.

This commit is contained in:
Andrey Smirnov
2014-02-26 16:24:54 +04:00
parent 8ebc3e65a5
commit 7c26c3ac14
3 changed files with 43 additions and 30 deletions
+3
View File
@@ -26,3 +26,6 @@ coverage.html
coverage*.out coverage*.out
*.pyc *.pyc
vendor/
bin/
+22
View File
@@ -0,0 +1,22 @@
gom 'code.google.com/p/go-uuid/uuid', :commit => '5fac954758f5'
gom 'code.google.com/p/go.crypto/ssh/terminal', :commit => '7aa593ce8cea'
gom 'code.google.com/p/gographviz', :commit => '212766062629'
gom 'code.google.com/p/snappy-go/snappy', :commit => '12e4b4183793'
gom 'github.com/cheggaaa/pb', :commit => '74be7a1388046f374ac36e93d46f5d56e856f827'
gom 'github.com/gonuts/commander', :commit => 'f8ba4e959ca914268227c3ebbd7f6bf0bb35541a'
gom 'github.com/gonuts/flag', :commit => '741a6cbd37a30dedc93f817e7de6aaf0ca38a493'
gom 'github.com/mkrautz/goar', :commit => '36eb5f3452b1283a211fa35bc00c646fd0db5c4b'
gom 'github.com/syndtr/goleveldb/leveldb', :commit => '527a7b286bd095794af6c519627b7ed3d8fd067a'
gom 'github.com/ugorji/go/codec', :commit => '71c2886f5a673a35f909803f38ece5810165097b'
gom 'github.com/wsxiaoys/terminal/color', :commit => '5668e431776a7957528361f90ce828266c69ed08'
group :test do
gom 'launchpad.net/gocheck'
end
group :development do
gom 'github.com/golang/lint/golint'
gom 'github.com/mattn/goveralls'
gom 'github.com/axw/gocov/gocov'
gom 'code.google.com/p/go.tools/cmd/cover'
end
+18 -30
View File
@@ -1,64 +1,52 @@
GOVERSION=$(shell go version | awk '{print $$3;}') GOVERSION=$(shell go version | awk '{print $$3;}')
PACKAGES=database debian files http utils
ifeq ($(TRAVIS), true) ALL_PACKAGES=aptly cmd console database debian files http utils
GOVERALLS?=$(HOME)/gopath/bin/goveralls BINPATH=$(abspath ./bin)
SRCPATH?=$(HOME)/gopath/src GOM_ENVIRONMENT=-test
BINPATH=$(HOME)/gopath/bin
else
GOVERALLS?=goveralls
SRCPATH?=$(GOPATH)/src
BINPATH?=$(GOPATH)/bin
endif
ifeq ($(GOVERSION), go1.2) ifeq ($(GOVERSION), go1.2)
TRAVIS_TARGET=coveralls TRAVIS_TARGET=coveralls
PREPARE_LIST=cover-prepare GOM_ENVIRONMENT+=-development
else else
TRAVIS_TARGET=test TRAVIS_TARGET=test
PREPARE_LIST=
endif endif
all: test check system-test all: test check system-test
prepare: $(PREPARE_LIST) prepare:
go get -d -v ./... mkdir -p $(BINPATH)
go get launchpad.net/gocheck gom $(GOM_ENVIRONMENT) install
cover-prepare:
go get github.com/golang/lint/golint
go get github.com/mattn/goveralls
go get github.com/axw/gocov/gocov
go get code.google.com/p/go.tools/cmd/cover
coverage.out: coverage.out:
rm -f coverage.*.out rm -f coverage.*.out
for i in database debian files http utils; do go test -coverprofile=coverage.$$i.out -covermode=count ./$$i; done for i in $(PACKAGES); do gom test -coverprofile=coverage.$$i.out -covermode=count ./$$i; done
echo "mode: count" > coverage.out echo "mode: count" > coverage.out
grep -v -h "mode: count" coverage.*.out >> coverage.out grep -v -h "mode: count" coverage.*.out >> coverage.out
rm -f coverage.*.out rm -f coverage.*.out
coverage: coverage.out coverage: coverage.out
go tool cover -html=coverage.out gom exec go tool cover -html=coverage.out
rm -f coverage.out rm -f coverage.out
check: check:
go tool vet -all=true . gom exec go tool vet -all=true $(ALL_PACKAGES:%=./%)
golint . gom exec golint $(ALL_PACKAGES:%=./%)
system-test: system-test:
ifeq ($(GOVERSION), go1.2) ifeq ($(GOVERSION),$(filter $(GOVERSION),go1.2 devel))
if [ ! -e ~/aptly-fixture-db ]; then git clone https://github.com/aptly-dev/aptly-fixture-db.git ~/aptly-fixture-db/; fi if [ ! -e ~/aptly-fixture-db ]; then git clone https://github.com/aptly-dev/aptly-fixture-db.git ~/aptly-fixture-db/; fi
endif endif
if [ ! -e ~/aptly-fixture-pool ]; then git clone https://github.com/aptly-dev/aptly-fixture-pool.git ~/aptly-fixture-pool/; fi if [ ! -e ~/aptly-fixture-pool ]; then git clone https://github.com/aptly-dev/aptly-fixture-pool.git ~/aptly-fixture-pool/; fi
go install gom build -o $(BINPATH)/aptly
PATH=$(BINPATH):$(PATH) python system/run.py --long PATH=$(BINPATH)/:$(PATH) python system/run.py --long
travis: $(TRAVIS_TARGET) system-test travis: $(TRAVIS_TARGET) system-test
test: test:
go test -v ./... -gocheck.v=true gom test -v $(PACKAGES:%=./%) -gocheck.v=true
coveralls: coverage.out coveralls: coverage.out
@$(GOVERALLS) -service travis-ci.org -coverprofile=coverage.out -repotoken $(COVERALLS_TOKEN) gom build -o $(BINPATH)/goveralls github.com/mattn/goveralls
gom exec $(BINPATH)/goveralls -service travis-ci.org -coverprofile=coverage.out -repotoken $(COVERALLS_TOKEN)
.PHONY: coverage.out .PHONY: coverage.out