debian-forge-composer/tools/prepare-source.sh
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

27 lines
697 B
Bash
Executable file

#!/bin/sh
set -eu
GO_MINOR_VERSION="1.22"
GO_VERSION="${GO_MINOR_VERSION}.8"
# Check latest Go version for the minor we're using
LATEST=$(curl -s https://endoflife.date/api/go/"${GO_MINOR_VERSION}".json | jq -r .latest)
if test "$LATEST" != "$GO_VERSION"; then
echo "NOTE: A new minor release is available (${LATEST}), consider bumping the project version (${GO_VERSION})"
fi
set -x
# Pin Go and toolbox versions
go get "go@${GO_VERSION}" "toolchain@${GO_VERSION}"
# Update go.mod and go.sum:
go mod tidy
go mod vendor
# Generate all sources (skip vendor/):
go generate ./cmd/... ./internal/... ./pkg/...
# Format all sources (skip vendor/):
go fmt ./cmd/... ./internal/... ./pkg/...