Skip to content

Commit

Permalink
misc: Move to golang 1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
purpleidea committed Dec 4, 2023
1 parent 271a94e commit fe2313c
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
# macos tests are currently failing in CI
#- macos-latest
golang_version:
# TODO: add 1.20.x and tip
# TODO: add 1.21.x and tip
# minimum required and latest published go_version
- 1.19
- 1.20
test_block:
- basic
- shell
Expand Down
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@ install: 'make deps'
matrix:
fast_finish: false
allow_failures:
- go: 1.20.x
- go: 1.21.x
- go: tip
- os: osx
# include only one build for osx for a quicker build as the nr. of these runners are sparse
include:
- name: "basic tests"
go: 1.19.x
go: 1.20.x
env: TEST_BLOCK=basic
- name: "shell tests"
go: 1.19.x
go: 1.20.x
env: TEST_BLOCK=shell
- name: "race tests"
go: 1.19.x
go: 1.20.x
env: TEST_BLOCK=race
- go: 1.20.x
- go: 1.21.x
- go: tip
- os: osx
script: 'TEST_BLOCK="$TEST_BLOCK" make test'
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19
FROM golang:1.20

MAINTAINER Michał Czeraszkiewicz <contact@czerasz.com>

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ENV PATH=/opt/rh/rh-ruby22/root/usr/bin:/root/gopath/bin:/usr/local/sbin:/sbin:/
ENV LD_LIBRARY_PATH=/opt/rh/rh-ruby22/root/usr/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
ENV PKG_CONFIG_PATH=/opt/rh/rh-ruby22/root/usr/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}

RUN yum -y install epel-release wget unzip git make which centos-release-scl gcc && sed -i "s/enabled=0/enabled=1/" /etc/yum.repos.d/epel-testing.repo && yum -y install rh-ruby22 && wget -O /opt/go1.19.12.linux-amd64.tar.gz https://storage.googleapis.com/golang/go1.19.12.linux-amd64.tar.gz && tar -C /usr/local -xzf /opt/go1.19.12.linux-amd64.tar.gz
RUN yum -y install epel-release wget unzip git make which centos-release-scl gcc && sed -i "s/enabled=0/enabled=1/" /etc/yum.repos.d/epel-testing.repo && yum -y install rh-ruby22 && wget -O /opt/go1.20.11.linux-amd64.tar.gz https://storage.googleapis.com/golang/go1.20.11.linux-amd64.tar.gz && tar -C /usr/local -xzf /opt/go1.20.11.linux-amd64.tar.gz
RUN mkdir -p $GOPATH/src/github.com/purpleidea && cd $GOPATH/src/github.com/purpleidea && git clone --recursive https://github.com/purpleidea/mgmt
RUN go get -u gopkg.in/alecthomas/gometalinter.v1 && cd $GOPATH/src/github.com/purpleidea/mgmt && make deps && make build
CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion docker/Dockerfile.development
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19
FROM golang:1.20

MAINTAINER Michał Czeraszkiewicz <contact@czerasz.com>

Expand Down
2 changes: 1 addition & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ required for running the _test_ suite.

### Build

* `golang` 1.19 or higher (required, available in some distros and distributed
* `golang` 1.20 or higher (required, available in some distros and distributed
as a binary officially by [golang.org](https://golang.org/dl/))

### Runtime
Expand Down
2 changes: 1 addition & 1 deletion docs/quick-start-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ You'll need some dependencies, including `golang`, and some associated tools.

#### Installing golang

* You need golang version 1.19 or greater installed.
* You need golang version 1.20 or greater installed.
* To install on rpm style systems: `sudo dnf install golang`
* To install on apt style systems: `sudo apt install golang`
* To install on macOS systems install [Homebrew](https://brew.sh)
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/purpleidea/mgmt

go 1.19
go 1.20

require (
github.com/aws/aws-sdk-go v1.48.5
Expand Down
4 changes: 2 additions & 2 deletions misc/make-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ BREW=`command -v brew 2>/dev/null`
PACMAN=`command -v pacman 2>/dev/null`

# set minimum golang version and installed golang version
mingolangversion=16
mingolangversion=20
golangversion=0
if [ -x "$GO" ]; then
# capture the minor version number
Expand Down Expand Up @@ -143,7 +143,7 @@ fi

# if golang is too old, we don't want to fail with an obscure error later
if [ "$golangversion" -lt "$mingolangversion" ]; then
echo "mgmt recommends go1.$mingolangversion or higher."
echo "mgmt recommends golang 1.$mingolangversion or higher."
exit 1
fi

Expand Down

0 comments on commit fe2313c

Please sign in to comment.