-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
381 changed files
with
158,149 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
language: go | ||
go: | ||
- 1.5.1 | ||
- 1.7 | ||
|
||
addons: | ||
apt: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
GO_SRC := $(shell find -type f -name '*.go' ! -path '*/vendor/*') | ||
GO_PKG := $(shell find -type d ! -path '*/vendor/*' ! -path '.*') | ||
VERSION ?= $(shell git describe --long --dirty) | ||
|
||
all: style vet test tail_exporter.x86_64 | ||
|
||
tail_exporter.x86_64: $(GO_SRC) | ||
GOOS=linux GOARCH=amd64 go build -a \ | ||
-ldflags "-extldflags '-static' -X main.Version=$(shell git describe --long --dirty)" \ | ||
-o tail_exporter.x86_64 . | ||
|
||
vet: | ||
go vet | ||
|
||
# Check code conforms to go fmt | ||
style: | ||
! gofmt -s -l $(GO_SRC) 2>&1 | read 2>/dev/null | ||
|
||
test: | ||
go test -v -covermode=count -coverprofile=cover.out | ||
|
||
lint: | ||
golint $(GO_PKG) | ||
|
||
# Format the code | ||
fmt: | ||
gofmt -s -w $(GO_SRC) | ||
|
||
.PHONY: test vet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.