go: move hummingbird.go

Use a more conventional code layout so go tools work as intended.

Change-Id: I7832843bb5bf25c75b79e83140c280eafb629f8c
This commit is contained in:
Michael Barton 2016-06-28 18:15:41 +00:00
parent a331f77253
commit 0ed2d6b341
2 changed files with 9 additions and 11 deletions

View File

@ -2,11 +2,9 @@ HUMMINGBIRD_VERSION?=$(shell git describe --tags)
all: bin/hummingbird
bin:
bin/hummingbird: */*.go
mkdir -p bin
bin/hummingbird: bin */*.go
go build -o bin/hummingbird -ldflags "-X main.Version=$(HUMMINGBIRD_VERSION)" cmd/hummingbird.go
go build -o bin/hummingbird -ldflags "-X main.Version=$(HUMMINGBIRD_VERSION)" cmd/hummingbird/main.go
get:
go get -t ./...
@ -14,14 +12,14 @@ get:
fmt:
go fmt ./...
install: all
cp bin/* $(DESTDIR)/usr/bin
develop: all
ln -f -s `pwd`/bin/* -t /usr/local/bin/
test:
@test -z "$(shell find . -name '*.go' | xargs gofmt -l)" || (echo "Need to run 'go fmt ./...'"; exit 1)
@test -z "$(shell find . -name '*.go' | xargs gofmt -l)" || (echo "You need to run 'go fmt ./...'"; exit 1)
go vet ./...
go test -cover ./...
install: bin/hummingbird
cp bin/hummingbird $(DESTDIR)/usr/bin/hummingbird
develop: bin/hummingbird
ln -f -s bin/hummingbird /usr/local/bin/hummingbird