-
Notifications
You must be signed in to change notification settings - Fork 30
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
94 changed files
with
12,004 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
language: go | ||
|
||
go: | ||
- 1.9 | ||
|
||
branches: | ||
only: | ||
- master | ||
- /^v.*$/ | ||
|
||
install: | ||
- go get -u github.com/golang/dep/cmd/dep | ||
|
||
script: | ||
- make deps | ||
- make test | ||
- make build | ||
|
||
|
||
before_deploy: | ||
- make release | ||
|
||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: 4jDPdpCqfV+sPgnw2/8tGASDtaomfSyjCEtGKB8rFHwjkZ2K/FJSyjIA0OrO0QmG/WidQVf8hyEmBBwk3uKHgMbASxYSP4AquUhzUkdtN9gmEQC0D8S1cZBGoWh0ymAts17TpWG4ledRSABGVrpJJ+8VL8mFj8HUxUEqDfqIh2KFqukjYDxL9NvPpbgcK3zJw9g91YCdVyrBZcFihYjE2+visQVRxmOHkNRhdxQ+LgUHJKNWwxJi1Y2GrCu2xJ/92GoT7VbNZw7xPYvLR6TKDMYKbsv4Lr0UNCFh3Adm68h005/kLKSVFuLnl+8s5KRIB5WvR6r/+u0BtkNsLxIKQIqJz82SDvW6/MF7RNtC7jquSS4kYebefwev7XDbUlzAX8VN3/rWi4z//6uMjRRKNuVvX6Tu6kXd5fGeU25mLGVQpSOLtZkckqXaBN7WrC62EMyTOBkccHLaMCZl+TdFGI9wz6gRZ3k0wzk4InvsUMpVK03LNWvHt4RGQwD+MKO1i7PglAMVb83ZWJ4a3PPGjQT8DHUmi48Il1verm1Uk5c8NtlfA6QSyiJtjmz3tUpkZ+rlM8rA/pWaypPHRs2bd8Z92MY+SR1Bxi3J0cD3r63YeK9uIwd7K6N6I5WZmwMOUCNaDhDT6bn96QXnG3nFQ+sKKfWCrOErhY+mNkDR01E= | ||
file_glob: true | ||
file: dist/* | ||
skip_cleanup: true | ||
on: | ||
tags: true | ||
|
||
notifications: | ||
email: false |
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 @@ | ||
# Change Log |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,46 @@ | ||
# Gopkg.toml example | ||
# | ||
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html | ||
# for detailed Gopkg.toml documentation. | ||
# | ||
# required = ["github.com/user/thing/cmd/thing"] | ||
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] | ||
# | ||
# [[constraint]] | ||
# name = "github.com/user/project" | ||
# version = "1.0.0" | ||
# | ||
# [[constraint]] | ||
# name = "github.com/user/project2" | ||
# branch = "dev" | ||
# source = "github.com/myfork/project2" | ||
# | ||
# [[override]] | ||
# name = "github.com/x/y" | ||
# version = "2.4.0" | ||
# | ||
# [prune] | ||
# non-go = false | ||
# go-tests = true | ||
# unused-packages = true | ||
|
||
|
||
[[constraint]] | ||
name = "github.com/ghodss/yaml" | ||
version = "1.0.0" | ||
|
||
[[constraint]] | ||
branch = "master" | ||
name = "github.com/mitchellh/go-homedir" | ||
|
||
[[constraint]] | ||
name = "github.com/spf13/cobra" | ||
version = "0.0.3" | ||
|
||
[[constraint]] | ||
name = "github.com/spf13/viper" | ||
version = "1.1.0" | ||
|
||
[prune] | ||
go-tests = true | ||
unused-packages = true |
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,41 @@ | ||
VERSION := $(shell grep "version = " cmd/version.go | awk '{print $$4}' | sed 's/"//g') | ||
|
||
PLATFORMS := linux/amd64 darwin/amd64 windows/amd64 | ||
temp = $(subst /, ,$@) | ||
os = $(word 1, $(temp)) | ||
arch = $(word 2, $(temp)) | ||
|
||
COMMONENVVAR = GOOS=$(shell uname -s | tr A-Z a-z) GOARCH=$(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m))) | ||
BUILDENVVAR = CGO_ENABLED=0 | ||
|
||
all: build | ||
|
||
deps: | ||
git config --global url."[email protected]:".insteadOf "https://github.com/" | ||
dep ensure | ||
|
||
test: | ||
$(COMMONENVVAR) $(BUILDENVVAR) go test ./... -v | ||
|
||
build: | ||
$(COMMONENVVAR) $(BUILDENVVAR) go vet ./... | ||
$(COMMONENVVAR) $(BUILDENVVAR) go build -o nr *.go | ||
|
||
tag: # used in client side to trigger a travis deployment job | ||
ifndef VERSION | ||
$(error VERSION is undefined - run using make tag VERSION=vX.Y.Z) | ||
endif | ||
git tag $(VERSION) | ||
|
||
# Check to make sure the tag isn't "-dirty". | ||
if git describe --tags --dirty | grep dirty; \ | ||
then echo current git working tree is "dirty". Make sure you do not have any uncommitted changes ;false; fi | ||
|
||
git push --tags | ||
|
||
$(PLATFORMS): | ||
GOOS=$(os) GOARCH=$(arch) $(BUILDENVVAR) go build -o dist/nr-$(os)-$(arch) *.go | ||
|
||
release: $(PLATFORMS) | ||
|
||
.PHONY: all deps test build tag release $(PLATFORMS) |
Oops, something went wrong.