-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Basic overlay implementation. Will accept a gilt.yml like the following and extract to dest. --- - url: https://github.com/retr0h/ansible-etcd.git version: 77a95b7 dst: roles/retr0h.ansible-etcd This port differs from the python version. The python version can clone a branch or tag. This version __only__ clones versions pointing to SHAs into a hashed directory structure similar to `dep`. * Unit tests. * CLI integration tests with bats. * Schema validation of config file. To test things have exported variables and interfaces, which feels kinda wrong.
- Loading branch information
Showing
294 changed files
with
53,227 additions
and
2,556 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
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 |
---|---|---|
@@ -1,7 +1,2 @@ | ||
*.egg-info/ | ||
*.py[cod] | ||
.cache/ | ||
.coverage | ||
.eggs/ | ||
.tox/ | ||
doc/build/ | ||
.build/ | ||
coverage* |
This file was deleted.
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,14 @@ | ||
--- | ||
sudo: falseo | ||
language: go | ||
go: | ||
- 1.10.x | ||
git: | ||
depth: 1 | ||
install: | ||
- go get golang.org/x/lint/golint | ||
- go get github.com/mattn/goveralls | ||
script: | ||
- make test | ||
- make cover | ||
- ${GOPATH}/bin/goveralls -coverprofile=coverage-all.out -service=travis-ci |
This file was deleted.
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,5 @@ | ||
# History | ||
|
||
## 0.0.1 | ||
|
||
* Ported to golang. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,23 @@ | ||
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md | ||
# for detailed Gopkg.toml documentation. | ||
|
||
[[constraint]] | ||
name = "github.com/spf13/cobra" | ||
|
||
[[constraint]] | ||
name = "gopkg.in/src-d/go-git" | ||
|
||
[[constraint]] | ||
name = "github.com/xeipuuv/gojsonschema" | ||
|
||
[[constraint]] | ||
name = "github.com/stretchr/testify" | ||
|
||
[[constraint]] | ||
name = "github.com/ghodss/yaml" | ||
|
||
[[constraint]] | ||
name = "github.com/kami-zh/go-capturer" | ||
|
||
[[constraint]] | ||
name = "github.com/logrusorgru/aurora" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
VENDOR := vendor | ||
PKGS := $(shell go list ./... | grep -v /$(VENDOR)/) | ||
$(if $(PKGS), , $(error "go list failed")) | ||
PKGS_DELIM := $(shell echo $(PKGS) | sed -e 's/ /,/g') | ||
GITCOMMIT ?= $(shell git rev-parse --short HEAD) | ||
$(if $(GITCOMMIT), , $(error "git rev-parse failed")) | ||
GITUNTRACKEDCHANGES := $(shell git status --porcelain --untracked-files=no) | ||
ifneq ($(GITUNTRACKEDCHANGES),) | ||
GITCOMMIT := $(GITCOMMIT)-dirty | ||
endif | ||
VERSION ?= $(shell git describe --tags --always) | ||
$(if $(VERSION), , $(error "git describe failed")) | ||
BUILDDATE := $(shell date '+%Y/%m/%d %H:%M:%S') | ||
LDFLAGS := -s \ | ||
-w \ | ||
-X 'main.version=$(VERSION)' \ | ||
-X 'main.buildHash=$(GITCOMMIT)' \ | ||
-X 'main.buildDate=$(BUILDDATE)' | ||
BUILDDIR := .build | ||
export GOCACHE = off | ||
|
||
test: fmt lint vet bats | ||
@echo "+ $@" | ||
@go test -parallel 5 -covermode=count ./... | ||
|
||
bats: | ||
@echo "+ $@" | ||
@./test/integration/vendor/bats/bin/bats test/integration | ||
|
||
cover: | ||
@echo "+ $@" | ||
$(shell [ -e coverage.out ] && rm coverage.out) | ||
@echo "mode: count" > coverage-all.out | ||
$(foreach pkg,$(PKGS),\ | ||
go test -coverprofile=coverage.out -covermode=count $(pkg);\ | ||
tail -n +2 coverage.out >> coverage-all.out;) | ||
@go tool cover -html=coverage-all.out -o=coverage-all.html | ||
|
||
fmt: | ||
@echo "+ $@" | ||
@gofmt -s -l . | grep -v $(VENDOR) | tee /dev/stderr | ||
|
||
lint: | ||
@echo "+ $@" | ||
@golint ./... | grep -v $(VENDOR) | tee /dev/stderr | ||
|
||
vet: | ||
@echo "+ $@" | ||
@go vet $(shell go list ./... | grep -v $(VENDOR)) | ||
|
||
clean: | ||
@echo "+ $@" | ||
@rm -rf $(BUILDDIR) | ||
|
||
build: clean | ||
@echo "+ $@" | ||
@docker run --rm -it \ | ||
-v $(CURDIR):/gopath/src/github.com/retr0h/go-gilt \ | ||
-w /gopath/src/github.com/retr0h/go-gilt \ | ||
tcnksm/gox:1.10.3 \ | ||
gox \ | ||
-ldflags="$(LDFLAGS)" \ | ||
-osarch="linux/amd64 darwin/amd64" \ | ||
-output="$(BUILDDIR)/{{.Dir}}_{{.OS}}_{{.Arch}}" |
Oops, something went wrong.