debian-forge-composer/tools/prepare-source.sh
Ondřej Budai b667df4443 bump the minimum Go version to 1.16
Fedora 34 ships 1.16
RHEL 8.5 also ships 1.16

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-01-12 11:35:06 +01:00

21 lines
502 B
Bash
Executable file

#!/bin/sh
set -eux
GO_VERSION=1.16.12
GO_BINARY=$(go env GOPATH)/bin/go$GO_VERSION
# this is the official way to get a different version of golang
# see https://golang.org/doc/install#extra_versions
go get golang.org/dl/go$GO_VERSION
$GO_BINARY download
# ensure that go.mod and go.sum are up to date, ...
$GO_BINARY mod tidy
$GO_BINARY mod vendor
# ... the code is formatted correctly, ...
$GO_BINARY fmt ./...
# ... and all code has been regenerated from its sources.
$GO_BINARY generate ./...