THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

misc, docs: Update minimum required golang version to 1.13

codeql
Ahmed Al-Hulaibi 1 year ago
committed by James Shubin
parent
commit
274e01bb75
  1. 10
      .travis.yml
  2. 2
      docker/Dockerfile
  3. 2
      docker/Dockerfile.development
  4. 2
      docs/development.md
  5. 2
      docs/quick-start-guide.md
  6. 14
      misc/make-deps.sh

10
.travis.yml

@ -24,21 +24,21 @@ install: 'make deps'
matrix:
fast_finish: false
allow_failures:
- go: 1.13.x
- go: 1.14.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.12.x
go: 1.13.x
env: TEST_BLOCK=basic
- name: "shell tests"
go: 1.12.x
go: 1.13.x
env: TEST_BLOCK=shell
- name: "race tests"
go: 1.12.x
go: 1.13.x
env: TEST_BLOCK=race
- go: 1.13.x
- go: 1.14.x
- go: tip
- os: osx
script: 'TEST_BLOCK="$TEST_BLOCK" make test'

2
docker/Dockerfile

@ -1,4 +1,4 @@
FROM golang:1.12
FROM golang:1.13
MAINTAINER Michał Czeraszkiewicz <contact@czerasz.com>

2
docker/Dockerfile.development

@ -1,4 +1,4 @@
FROM golang:1.12
FROM golang:1.13
MAINTAINER Michał Czeraszkiewicz <contact@czerasz.com>

2
docs/development.md

@ -28,7 +28,7 @@ required for running the _test_ suite.
### Build
* `golang` 1.12 or higher (required, available in some distros and distributed
* `golang` 1.13 or higher (required, available in some distros and distributed
as a binary officially by [golang.org](https://golang.org/dl/))
### Runtime

2
docs/quick-start-guide.md

@ -37,7 +37,7 @@ You'll need some dependencies, including `golang`, and some associated tools.
#### Installing golang
* You need golang version 1.12 or greater installed.
* You need golang version 1.13 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)

14
misc/make-deps.sh

@ -19,6 +19,14 @@ NEWAPT=`command -v apt 2>/dev/null`
BREW=`command -v brew 2>/dev/null`
PACMAN=`command -v pacman 2>/dev/null`
# set minimum go version and installed go version
mingoversion=13
goversion=0
if [ -x "$GO" ]; then
# capture the minor version number
goversion=$(go version | grep -o -P '(?<=go1\.)[0-9]*')
fi
# if DNF is available use it
if [ -x "$DNF" ]; then
YUM=$DNF
@ -97,7 +105,7 @@ if [ $travis -eq 0 ]; then
fi
# attempt to workaround old ubuntu
if [ ! -z "$APT" ] && go version | grep -e 'go1\.[0123456789]\.' -e 'go1\.10\.'; then
if [ ! -z "$APT" ] && [ "$goversion" -lt "$mingoversion" ]; then
echo "install golang from a ppa."
$sudo_command $APT remove -y golang
$sudo_command $APT install -y software-properties-common # for add-apt-repository
@ -107,8 +115,8 @@ if [ ! -z "$APT" ] && go version | grep -e 'go1\.[0123456789]\.' -e 'go1\.10\.';
fi
# if golang is too old, we don't want to fail with an obscure error later
if go version | grep -e 'go1\.[0123456789]\.' -e 'go1\.10\.'; then
echo "mgmt recommends go1.11 or higher."
if [ "$goversion" -lt "$mingoversion" ]; then
echo "mgmt recommends go1.$mingoversion or higher."
exit 1
fi

Loading…
Cancel
Save