-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #154 from CiscoCloud/feature/travis
travis ci
- Loading branch information
Showing
12 changed files
with
144 additions
and
243 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,2 +1,7 @@ | ||
--- | ||
language: go | ||
|
||
go: | ||
- 1.6 | ||
|
||
install: make deps |
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,23 +1,32 @@ | ||
TEST?=$(glide novendor) | ||
NAME = $(shell awk -F\" '/^const Name/ { print $$2 }' main.go) | ||
VERSION = $(shell awk -F\" '/^const Version/ { print $$2 }' main.go) | ||
|
||
all: deps build | ||
# Should we use a system-wide copy of glide, or a locally built one? | ||
GLIDE = $(shell which glide > /dev/null && echo "glide" || echo "./glide") | ||
|
||
deps: | ||
glide install | ||
all: glide deps build test package | ||
|
||
updatedeps: | ||
glide update | ||
# Build glide in this directory. This 1. works in travis and 2. doesn't | ||
# clutter up developers' machines with unnecessary programs. | ||
glide: | ||
which glide > /dev/null || go get -v github.com/Masterminds/glide | ||
which glide > /dev/null || go build -o glide github.com/Masterminds/glide | ||
|
||
deps: glide | ||
$(GLIDE) install | ||
|
||
updatedeps: glide | ||
$(GLIDE) update | ||
|
||
build: deps | ||
@mkdir -p bin/ | ||
go build -o bin/$(NAME) | ||
|
||
test: deps | ||
go test $(TEST) $(TESTARGS) -timeout=30s -parallel=4 | ||
test: glide deps | ||
#go test -v $(shell $(GLIDE) novendor) | ||
go test -v ./chkutil/... ./dockerstatus/... ./errutil/... ./fsstatus/... ./netstatus/... ./systemdstatus/... ./tabular/... . | ||
|
||
package: build | ||
tar -zcvf bin/$(NAME).tar.gz bin/$(NAME) | ||
|
||
.PHONY: all deps updatedeps build test package | ||
.PHONY: all glide deps build test package |
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
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.