Skip to content

Commit ca3e1e2

Browse files
committed
Adopt go mod
Also, "-i" is unnecessary now we've switched to go 1.12.
1 parent 6e315e8 commit ca3e1e2

File tree

9 files changed

+152
-402
lines changed

9 files changed

+152
-402
lines changed

.envrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export GO111MODULE=on

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ kubernetes-backup
88
dist/*
99
profile.cov
1010
katafygio.8.gz
11+
katafygio

Dockerfile

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
FROM golang:1.12 as builder
22
WORKDIR /go/src/github.com/bpineau/katafygio
33
COPY . .
4-
RUN go get -u github.com/Masterminds/glide
5-
RUN make deps
64
RUN make build
75

86
FROM alpine:3.10

Makefile

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1+
GOLANGCI_VERSION="1.12.5"
2+
export GO111MODULE := on
3+
14
all: build
25

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

1415
lint:
@@ -21,18 +22,15 @@ man:
2122
fmt:
2223
go fmt ./...
2324

24-
deps:
25-
glide install
26-
2725
build:
28-
env CGO_ENABLED=0 go build -i
26+
env CGO_ENABLED=0 go build
2927

3028
install:
3129
env CGO_ENABLED=0 go install
3230

3331
clean:
3432
rm -rf dist/
35-
go clean -i
33+
go clean
3634

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

4442
test:
45-
go test -i github.com/bpineau/katafygio/...
43+
go test github.com/bpineau/katafygio/...
4644
go test -race -cover -coverprofile=profile.cov github.com/bpineau/katafygio/...
4745

4846
.PHONY: tools lint fmt install clean coverall test all

README.md

-7
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,6 @@ You can also deploy with the provided [helm](https://helm.sh/) chart:
110110
helm install --name kf-backups --namespace kube-system assets/helm-chart/katafygio/
111111
```
112112

113-
If you want to build from sources, assuming you have go 1.10 or up and glide in the path, and GOPATH configured:
114-
115-
```shell
116-
make deps
117-
make build
118-
```
119-
120113
## See Also
121114

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

0 commit comments

Comments
 (0)