diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6bafa2c --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +*.o +*.a +*.so +*.swp +*.swo +/vendor/ +dist/* +cloud-floating-ip diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..d543d0a --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,22 @@ +builds: + - + ldflags: -s -w -X github.com/bpineau/cloud-floating-ip/cmd.version={{.Version}} + env: + - CGO_ENABLED=0 + goos: + - darwin + - linux + goarch: + - amd64 + +release: + # don't autopublish + draft: true + +dockers: + - + image: bpineau/cloud-floating-ip + goos: linux + goarch: amd64 + latest: true + dockerfile: Dockerfile.goreleaser diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8c9f3b0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,14 @@ +language: go +go: + - 1.9.x + +install: + - make tools + - make deps + +script: + - make lint + - make test + - make coverall + - make install + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..62078c1 --- /dev/null +++ b/Makefile @@ -0,0 +1,55 @@ + +all: build + +tools: + which gometalinter || ( go get -u github.com/alecthomas/gometalinter && gometalinter --install ) + which glide || go get -u github.com/Masterminds/glide + which goveralls || go get github.com/mattn/goveralls + +lint: + gometalinter --concurrency=1 --deadline=300s --vendor --disable-all \ + --enable=golint \ + --enable=vet \ + --enable=vetshadow \ + --enable=varcheck \ + --enable=errcheck \ + --enable=structcheck \ + --enable=deadcode \ + --enable=ineffassign \ + --enable=dupl \ + --enable=gotype \ + --enable=varcheck \ + --enable=interfacer \ + --enable=goconst \ + --enable=megacheck \ + --enable=unparam \ + --enable=misspell \ + --enable=gas \ + --enable=goimports \ + --enable=gocyclo \ + ./... + +fmt: + go fmt ./... + +deps: + glide install + +build: + env CGO_ENABLED=0 go build -i + +install: + env CGO_ENABLED=0 go install + +clean: + rm -rf dist/ + go clean -i + +coverall: + goveralls -service=travis-ci -package github.com/bpineau/cloud-floating-ip/pkg/... + +test: + go test -i github.com/bpineau/cloud-floating-ip/... + go test -race -cover github.com/bpineau/cloud-floating-ip/... + +.PHONY: tools lint fmt install clean coverall test all diff --git a/README.md b/README.md new file mode 100644 index 0000000..71ba0e7 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# cloud-floating-ip + +NOT YET READY. + +Implement a floating IP by modifying GCE or AWS routes. + +## Build + +Assuming you have go 1.9 and glide in the path, and GOPATH configured: + +```shell +make deps +make build +``` + +## Usage +