Skip to content

Commit

Permalink
build(deps): bump to Go 1.22 and simplify prepare-sources.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
lzap committed Jan 9, 2025
1 parent f41c764 commit 12b8691
Show file tree
Hide file tree
Showing 41 changed files with 22 additions and 633 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"
- env:
PGUSER: postgres
PGPASSWORD: foobar
Expand Down Expand Up @@ -106,10 +106,10 @@ jobs:
name: "⌨ Golang Lint"
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.21
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"
id: go

- name: Check out code into the Go module directory
Expand Down Expand Up @@ -154,10 +154,10 @@ jobs:
runs-on: ubuntu-20.04
steps:

- name: Set up Go 1.21
- name: Set up Go 1.22
uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"
id: go

- name: Check out code into the Go module directory
Expand Down
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/osbuild/osbuild-composer

go 1.21.0

toolchain go1.21.11
go 1.22.10

exclude github.com/mattn/go-sqlite3 v2.0.3+incompatible

Expand Down
6 changes: 3 additions & 3 deletions pkg/splunk_logger/go.mod
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module github.com/osbuild/osbuild-composer/pkg/splunk_logger

go 1.21
go 1.22

require (
github.com/hashicorp/go-retryablehttp v0.7.5
github.com/hashicorp/go-retryablehttp v0.7.7
github.com/sirupsen/logrus v1.9.3
github.com/stretchr/testify v1.8.4
)
Expand All @@ -12,6 +12,6 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
golang.org/x/sys v0.29.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
4 changes: 4 additions & 0 deletions pkg/splunk_logger/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxC
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
github.com/hashicorp/go-retryablehttp v0.7.5 h1:bJj+Pj19UZMIweq/iie+1u5YCdGrnxCT9yvm0e+Nd5M=
github.com/hashicorp/go-retryablehttp v0.7.5/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8=
github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU=
github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
Expand All @@ -18,6 +20,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU=
golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
Expand Down
23 changes: 9 additions & 14 deletions tools/prepare-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,15 @@

set -eux

GO_VERSION=1.21.11
GO_BINARY=$(go env GOPATH)/bin/go$GO_VERSION
# Since Go 1.21 the version is automatically maintained by the toolchain feature:
go get go@1.22 toolchain@1.22.10

# this is the official way to get a different version of golang
# see https://go.dev/doc/manage-install
go install golang.org/dl/go$GO_VERSION@latest
$GO_BINARY download
# Update go.mod and go.sum:
go mod tidy
go mod vendor

# ensure that go.mod and go.sum are up to date, ...
$GO_BINARY mod tidy
$GO_BINARY mod vendor
# Generate all sources (skip vendor/):
go generate ./cmd/... ./internal/... ./pkg/...

# ... and all code has been regenerated from its sources.
$GO_BINARY generate ./...

# ... the code is formatted correctly, ...
$GO_BINARY fmt ./...
# Generate all sources (skip vendor/):
go fmt ./cmd/... ./internal/... ./pkg/...

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 12b8691

Please sign in to comment.