Skip to content

Commit

Permalink
Merge pull request #78 from bpineau/gomod
Browse files Browse the repository at this point in the history
Adopt go mod
  • Loading branch information
bpineau committed Jul 6, 2019
2 parents 6e315e8 + b4390ef commit 3a7687e
Show file tree
Hide file tree
Showing 10 changed files with 152 additions and 403 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export GO111MODULE=on
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ kubernetes-backup
dist/*
profile.cov
katafygio.8.gz
katafygio
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ before_script:

install:
- make tools
- make deps

script:
- make lint
Expand Down
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
FROM golang:1.12 as builder
WORKDIR /go/src/github.com/bpineau/katafygio
COPY . .
RUN go get -u github.com/Masterminds/glide
RUN make deps
RUN make build

FROM alpine:3.10
Expand Down
14 changes: 6 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
GOLANGCI_VERSION="1.12.5"
export GO111MODULE := on

all: build

GOLANGCI_VERSION="1.12.5"
tools:
which golangci-lint || ( \
curl -sfL "https://github.com/golangci/golangci-lint/releases/download/v${GOLANGCI_VERSION}/golangci-lint-${GOLANGCI_VERSION}-linux-amd64.tar.gz" | \
tar xz --strip-components 1 --wildcards '*/golangci-lint' && \
chmod 755 golangci-lint && \
mv golangci-lint ${GOPATH}/bin/ \
)
which glide || go get -u github.com/Masterminds/glide
which goveralls || go get github.com/mattn/goveralls

lint:
Expand All @@ -21,18 +22,15 @@ man:
fmt:
go fmt ./...

deps:
glide install

build:
env CGO_ENABLED=0 go build -i
env CGO_ENABLED=0 go build

install:
env CGO_ENABLED=0 go install

clean:
rm -rf dist/
go clean -i
go clean

coverall:
goveralls -coverprofile=profile.cov -service=travis-ci -package github.com/bpineau/katafygio/pkg/...
Expand All @@ -42,7 +40,7 @@ e2e:
go test -count=1 -v assets/e2e_test.go

test:
go test -i github.com/bpineau/katafygio/...
go test github.com/bpineau/katafygio/...
go test -race -cover -coverprofile=profile.cov github.com/bpineau/katafygio/...

.PHONY: tools lint fmt install clean coverall test all
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,6 @@ You can also deploy with the provided [helm](https://helm.sh/) chart:
helm install --name kf-backups --namespace kube-system assets/helm-chart/katafygio/
```

If you want to build from sources, assuming you have go 1.10 or up and glide in the path, and GOPATH configured:

```shell
make deps
make build
```

## See Also

* [Heptio Ark](https://github.com/heptio/ark) does sophisticated clusters backups, including volumes
Expand Down

0 comments on commit 3a7687e

Please sign in to comment.