Skip to content

Commit

Permalink
Update Go to v1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
bmelbourne committed Feb 26, 2021
1 parent 86ea369 commit 1b99a0a
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v2
with:
go-version: 1.15.8
go-version: 1.16

- uses: actions/checkout@v2
with:
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v2
with:
go-version: 1.15.8
go-version: 1.16

- uses: actions/checkout@v2
with:
Expand All @@ -50,7 +50,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v2
with:
go-version: 1.15.8
go-version: 1.16

- uses: actions/checkout@v2
with:
Expand All @@ -67,7 +67,7 @@ jobs:
- name: Set up go
uses: actions/setup-go@v2
with:
go-version: 1.15.8
go-version: 1.16

- uses: actions/checkout@v2
with:
Expand Down
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ kops-gobindata: ${BINDATA_TARGETS}

.PHONY: update-bindata
update-bindata:
GO111MODULE=on go run github.com/go-bindata/go-bindata/v3/go-bindata -o ${BINDATA_TARGETS} -pkg models -nometadata -nocompress -ignore="\\.DS_Store" -ignore="bindata\\.go" -ignore="vfs\\.go" -prefix upup/models upup/models/cloudup/...
cd "${KOPS_ROOT}/hack" && GO111MODULE=on go build -o "${KOPS_ROOT}/_output/bin/goimports" golang.org/x/tools/cmd/goimports
go run github.com/go-bindata/go-bindata/v3/go-bindata -o ${BINDATA_TARGETS} -pkg models -nometadata -nocompress -ignore="\\.DS_Store" -ignore="bindata\\.go" -ignore="vfs\\.go" -prefix upup/models upup/models/cloudup/...
cd "${KOPS_ROOT}/hack" && go build -o "${KOPS_ROOT}/_output/bin/goimports" golang.org/x/tools/cmd/goimports
"${KOPS_ROOT}/_output/bin/goimports" -w -v ${BINDATA_TARGETS}
gofmt -w -s ${BINDATA_TARGETS}

Expand Down Expand Up @@ -382,17 +382,17 @@ gomod-prereqs:

.PHONY: gomod
gomod: gomod-prereqs
GO111MODULE=on go mod tidy
GO111MODULE=on go mod vendor
go mod tidy
go mod vendor
# Switch weavemesh to use peer_name_hash - bazel rule-go doesn't support build tags yet
rm vendor/github.com/weaveworks/mesh/peer_name_mac.go
sed -i -e 's/peer_name_hash/!peer_name_mac/g' vendor/github.com/weaveworks/mesh/peer_name_hash.go
# Remove all bazel build files that were vendored and regenerate (we assume they are go-gettable)
find vendor/ -name "BUILD" -delete
find vendor/ -name "BUILD.bazel" -delete
make gazelle
cd tests/e2e; GO111MODULE=on go mod tidy
cd hack; GO111MODULE=on go mod tidy
cd tests/e2e; go mod tidy
cd hack; go mod tidy


.PHONY: gofmt
Expand Down Expand Up @@ -955,7 +955,7 @@ dev-upload: dev-upload-linux-amd64 dev-upload-linux-arm64

.PHONY: crds
crds:
cd "${KOPS_ROOT}/hack" && GO111MODULE=on go build -o "${KOPS_ROOT}/_output/bin/controller-gen" sigs.k8s.io/controller-tools/cmd/controller-gen
cd "${KOPS_ROOT}/hack" && go build -o "${KOPS_ROOT}/_output/bin/controller-gen" sigs.k8s.io/controller-tools/cmd/controller-gen
"${KOPS_ROOT}/_output/bin/controller-gen" crd paths=k8s.io/kops/pkg/apis/kops/v1alpha2 output:dir=k8s/crds/ crd:crdVersions=v1

#------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_depe
go_rules_dependencies()

go_register_toolchains(
go_version = "1.15.8",
go_version = "1.16",
)

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module k8s.io/kops

go 1.14
go 1.16

// Version kubernetes-1.20.0-beta.2 => tag v0.20.0

Expand Down
2 changes: 1 addition & 1 deletion hack/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module k8s.io/kops/hack

go 1.15
go 1.16

require (
github.com/bazelbuild/bazel-gazelle v0.22.3
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/e2e.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ GOARCH ?= $(shell go env GOARCH)
.PHONY: test-e2e-install
test-e2e-install:
cd $(KOPS_ROOT)/tests/e2e && \
export GO111MODULE=on && \
go install sigs.k8s.io/kubetest2 && \
go install ./kubetest2-tester-kops && \
go install ./kubetest2-kops
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module k8s.io/kops/tests/e2e

go 1.15
go 1.16

require (
github.com/blang/semver v3.5.1+incompatible
Expand Down

0 comments on commit 1b99a0a

Please sign in to comment.