Skip to content

Commit

Permalink
Merge pull request #300 from dramich/bumpall
Browse files Browse the repository at this point in the history
Bump go, alpine, golangci-lint
  • Loading branch information
dramich committed Mar 15, 2021
2 parents 370d7fc + 1028770 commit 8de9f8e
Show file tree
Hide file tree
Showing 1,514 changed files with 242 additions and 358,414 deletions.
13 changes: 13 additions & 0 deletions .golangci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"linters": {
"disable-all": true,
"enable": [
"govet",
"golint",
"goimports"
]
},
"run": {
"timeout": "10m"
}
}
16 changes: 7 additions & 9 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
FROM golang:1.13.9
FROM golang:1.16
RUN apt-get update && \
apt-get install -y xz-utils zip rsync

RUN go get -u golang.org/x/lint/golint && \
go get -d golang.org/x/tools/cmd/goimports && \
# This needs to be kept up to date with rancher/types
git -C /go/src/golang.org/x/tools/cmd/goimports checkout -b release-branch.go1.13 origin/release-branch.go1.13 && \
go install golang.org/x/tools/cmd/goimports
RUN curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.38.0;

RUN curl -sL https://get.docker.com/builds/Linux/x86_64/docker-1.9.1 > /usr/bin/docker && \
ENV DOCKER_VERSION=20.10.5

RUN curl -sL https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz -o docker-${DOCKER_VERSION}.tgz && \
tar -zxvf docker-${DOCKER_VERSION}.tgz -C /usr/bin docker/docker --strip-components 1 && \
chmod +x /usr/bin/docker

ENV GO111MODULE off
ENV PATH /go/bin:$PATH
ENV DAPPER_SOURCE /go/src/github.com/rancher/cli
ENV DAPPER_OUTPUT bin build/bin dist
ENV DAPPER_DOCKER_SOCKET true
ENV DAPPER_ENV TAG REPO GOOS CROSS DRONE_TAG
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]
CMD ["ci"]
30 changes: 14 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
module github.com/rancher/cli

go 1.13
go 1.16

replace k8s.io/client-go => k8s.io/client-go v0.17.2
replace k8s.io/client-go => k8s.io/client-go v0.20.1

require (
github.com/c-bata/go-prompt v0.0.0-20180219161504-f329ebd2409d
github.com/c-bata/go-prompt v0.2.6
github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0
github.com/ghodss/yaml v1.0.0
github.com/gorilla/websocket v1.4.0
github.com/gorilla/websocket v1.4.2
github.com/grantae/certinfo v0.0.0-20170412194111-59d56a35515b
github.com/hashicorp/go-version v1.1.0
github.com/mattn/go-tty v0.0.0-20180219170247-931426f7535a // indirect
github.com/patrickmn/go-cache v2.0.0+incompatible
github.com/pkg/errors v0.8.1
github.com/pkg/term v0.0.0-20160705081919-b1f72af2d630 // indirect
github.com/hashicorp/go-version v1.2.1
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pkg/errors v0.9.1
github.com/rancher/norman v0.0.0-20200520181341-ab75acb55410
github.com/rancher/types v0.0.0-20200528213132-b5fb46b1825d
github.com/sirupsen/logrus v1.4.2
github.com/stretchr/testify v1.4.0
github.com/urfave/cli v1.22.4
golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15
gopkg.in/yaml.v2 v2.2.8
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.7.0
github.com/urfave/cli v1.22.5
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c
gopkg.in/yaml.v2 v2.4.0
)
287 changes: 196 additions & 91 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine:3.11
FROM alpine:3.13
RUN apk add --no-cache ca-certificates openssh-client
COPY rancher /usr/bin/
WORKDIR /mnt
Expand Down
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ cd $(dirname $0)/..

echo Running tests

go test -race -cover -tags=test .././...
go test -race -cover -tags=test ./...
18 changes: 10 additions & 8 deletions scripts/validate
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ set -e

cd $(dirname $0)/..

echo Running: go fmt
test -z "$(go fmt ./... | tee /dev/stderr)"
echo Running: golangci-lint
golangci-lint run

echo Running: go vet
test -z "$(go vet ./... 2>&1 | tee /dev/stderr)"
echo Tidying up modules
go mod tidy

echo Running: golint
test -z "$(go list ./... | grep -v /vendor/ | xargs -L1 golint | grep -v 'or be unexported' | tee /dev/stderr)"
echo Verifying modules
go mod verify

echo Running: goimports
test -z "$(goimports -d $(find . -type f -name '*.go' -not -path "./vendor/*") | tee /dev/stderr)"
if [ -n "$(git status --porcelain --untracked-files=no)" ]; then
echo "Encountered dirty repo!"
exit 1
fi
25 changes: 0 additions & 25 deletions vendor/github.com/c-bata/go-prompt/.gitignore

This file was deleted.

48 changes: 0 additions & 48 deletions vendor/github.com/c-bata/go-prompt/CHANGELOG.md

This file was deleted.

39 changes: 0 additions & 39 deletions vendor/github.com/c-bata/go-prompt/Gopkg.lock

This file was deleted.

34 changes: 0 additions & 34 deletions vendor/github.com/c-bata/go-prompt/Gopkg.toml

This file was deleted.

21 changes: 0 additions & 21 deletions vendor/github.com/c-bata/go-prompt/LICENSE

This file was deleted.

36 changes: 0 additions & 36 deletions vendor/github.com/c-bata/go-prompt/Makefile

This file was deleted.

Loading

0 comments on commit 8de9f8e

Please sign in to comment.