Skip to content

Upgrade to Go 1.18 #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.17.x
go-version: 1.18.x
- name: Release
uses: goreleaser/goreleaser-action@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Development

The Asset Relocation Tool for Kubernetes is built with Golang 1.17.
The Asset Relocation Tool for Kubernetes is built preferably with Golang 1.18, although 1.17 is also supported.

### Running tests

Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@ default: build
.PHONY: deps-go-binary deps-counterfeiter deps-ginkgo deps-golangci-lint

GO_VERSION := $(shell go version)
GO_VERSION_REQUIRED = go1.17
GO_VERSION_MATCHED := $(shell go version | grep $(GO_VERSION_REQUIRED))
PREFERRED_VERSION=1.18
PREVIOUS_VERSION=1.17
VERSION_MATCHED := $(shell go version | grep "$(PREFERRED_VERSION)\|$(PREVIOUS_VERSION)")

deps-go-binary:
ifndef GO_VERSION
$(error Go not installed)
endif
ifndef GO_VERSION_MATCHED
$(error Required Go version is $(GO_VERSION_REQUIRED), but was $(GO_VERSION))
ifndef VERSION_MATCHED
$(error Required Go versions are $(PREFERRED_VERSION) or $(PREVIOUS_VERSION), but we have $(GO_VERSION))
endif
@:

Expand Down
2 changes: 1 addition & 1 deletion ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM harbor-repo.vmware.com/dockerhub-proxy-cache/library/photon:3.0-20210716
WORKDIR /

# Install required packages
RUN yum -y install build-essential coreutils gawk gcc git go-1.17.2-1.ph3.x86_64 jq make
RUN yum -y install build-essential coreutils gawk gcc git go-1.18.2-1.ph3.x86_64 jq make
ENV PATH="/root/go/bin:${PATH}"

# Install go packages used for building and testing
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 github.com/vmware-tanzu/asset-relocation-tool-for-kubernetes

go 1.17
go 1.18

require (
github.com/avast/retry-go v3.0.0+incompatible
Expand Down
2 changes: 1 addition & 1 deletion test/registry/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright 2021 VMware, Inc.
# SPDX-License-Identifier: BSD-2-Clause
FROM golang:1.17 as compiled
FROM golang:1.18 as compiled
RUN cd /go && \
GO111MODULE=off go get -u filippo.io/mkcert && \
cd src/filippo.io/mkcert && \
Expand Down