Commit graph

19 commits

Author SHA1 Message Date
Michael Vogt
409b4f6048 go.mod: update to images@v0.117.0
This commit updates to images v0.117.0 so that the cross-distro.sh
test works again (images removed fedora-39.json in main but the
uses the previous version of images that includes fedora-39 so
there is a mismatch (we should look into if there is a way to
get github.com/osbuild/images@latest instead of main in the
cross-arch test).

It also updates all the vendor stuff that got pulled via the
new images release (which is giantonormous).

This update requires updating the Go version to 1.22.8
2025-02-19 19:19:42 +01:00
Achilleas Koutsou
aac74da605 tools: add patch version check to prepare-source.sh
Use endoflife.date to check for newer versions of the minor Go version
we're using and print a notice.
2025-02-17 12:42:35 +01:00
Achilleas Koutsou
231ee2896c tools: use go toolbox instead of installing a binary
Repeat of 8554d6202d.

This is a much nicer (and newer) way of handling the Go version for the
project.  The issue that caused the previous revert was that the toolbox
version was being set to 1.22.0, which is older than what some
dependencies require, specifically osbuild/images, so the 'go mod tidy'
would downgrade images to match the required toolbox version.

Setting the go and toolbox version to 1.22.6 should make it all work as
expected.

This reverts commit 7e87d1e124.

Co-authored-by: Lukáš Zapletal <lukas@zapletalovi.com>
2025-02-17 12:42:35 +01:00
Achilleas Koutsou
7e87d1e124 tools: revert prepare-source.sh to use downloaded go binary
The new script can cause changes to the go.mod when executing
`go get go@version`, downgrading packages that we want to bump, which
can revert changes we want the tool to be tidying.

We can work around this for now, but with the script being part of our
PR checks, we also need to revert the script so we can get module
updates through.

This reverts 8554d6202d
2025-02-06 13:48:59 +01:00
Lukas Zapletal
3a6bea380e build(deps): bump to Go 1.22 2025-01-31 16:57:31 +01:00
Lukas Zapletal
8554d6202d build: use go toolbox instead installing binary 2025-01-31 16:57:31 +01:00
Brian C. Lane
8cfba81b2c prepare-source: Move go fmt to last step
When rebasing, the generated code ends up with conflict markers in it
and go fmt quits with an error. This change regenerates the code first
so that fmt is happy with it.
2024-08-12 02:43:38 -07:00
Achilleas Koutsou
1cc90c6a0b go.mod: update to go v1.21
Go 1.21 is included in all currently supported distro versions.
It is required by new updates to some of our dependencies, including
osbuild/images.
2024-07-04 19:01:07 +02:00
Achilleas Koutsou
f98169c29a go.mod: update to go v1.20
Go 1.20 is included in all currently supported distro versions.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2024-04-11 16:39:21 +02:00
Ondřej Budai
cac9327b44 update to go 1.19
UBI and the oldest support Fedora (37) now all have go 1.19, so we are
cleared to switch.

gofmt now reformats comments in certain cases, so that explains the formatting
changes in this commit.
See https://go.dev/doc/go1.19#go-doc

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-07-21 19:18:00 +02:00
Ondřej Budai
0359647a82 go.mod: update to Go 1.18
Fedora 35 support was dropped, so we can update to a newer Go.

Stable RHEL 8 and 9 and Fedora 36 ships Go 1.18, so let's switch to it.

"//go:build" directives are now apparently enforced by go fmt, so that's why
there were added.

Also, all the github actions were adjusted to use Go 1.18.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-01-09 14:03:18 +01:00
Brian C. Lane
d73171fdde Use go install instead of deprecated go get
In go 1.18 'go install' needs to be used to install an executable. See
https://go.dev/doc/go-get-install-deprecation and
https://go.dev/doc/manage-install
2022-11-09 12:08:43 +01:00
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
Ondřej Budai
78ef247042 bump minimum go version to 1.15
The oldest distributions that we now support are RHEL 8.4 and Fedora 33.
They both support go 1.15, let's bump.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-07-07 17:26:18 +01:00
Ondřej Budai
f2318f8c5f go: bump to 1.14
The oldest distros we support are Fedora 32 and RHEL 8.3. As both have
Go 1.14, we're safe to upgrade.

Also, I had to change prepare-source.sh because go fmt now refuses to run on
a project which has issues in go.mod, go.sum or modules.text. I think this
should be a harmless change.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-02-01 15:32:58 +01:00
Lars Karlitski
c07674e1f4 tools/prepare-source: also call go generate ./...
To ensure that all generated code is up to date.
2020-09-08 20:40:08 +02:00
Ondřej Budai
5e6e77b565 bump minimal Go version to 1.13
All our downstream platforms now support Go 1.13:

RHEL 8.2: golang-1.13.4
Fedora 31: golang-1.13.14

There's no reason anymore to stay on 1.12, therefore this commit bumps
the minimal required Go version to 1.13
2020-08-25 10:42:21 +02:00
Ondřej Budai
d9cbdede41 tools/prepare-source: use a well-defined go version
go mod works differently in go 1.12 and go 1.13. When someone uses the
prepare-source tool with go >= 1.13, the ci complains because it uses
go 1.12. This commit changes the script to use a well-defined go version.
2020-04-23 08:54:29 +02:00
Lars Karlitski
049969911d tools: add prepare-source.sh
A script that runs various go tools (mod tidy, mod vendor, and fmt for
now).

The idea is that it prepares the source to be ready for master. As such,
running it on master shouldn't modify any files. Make sure of that by
adding a test.
2020-02-17 16:09:17 +01:00