Skip to content

Commit

Permalink
build: pin oapi-gen until toolbox gets 1.21.13
Browse files Browse the repository at this point in the history
  • Loading branch information
lzap committed Sep 24, 2024
1 parent 249c2bb commit c0f3727
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ require (
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/oapi-codegen/oapi-codegen/v2 v2.3.0 // indirect
github.com/perimeterx/marshmallow v1.1.5 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=
github.com/nxadm/tail v1.4.11/go.mod h1:OTaG3NK980DZzxbRq6lEuzgU+mug70nY11sMd4JXXHc=
github.com/oapi-codegen/oapi-codegen/v2 v2.3.0 h1:rICjNsHbPP1LttefanBPnwsSwl09SqhCO7Ee623qR84=
github.com/oapi-codegen/oapi-codegen/v2 v2.3.0/go.mod h1:4k+cJeSq5ntkwlcpQSxLxICCxQzCL772o30PxdibRt4=
github.com/oapi-codegen/runtime v1.1.1 h1:EXLHh0DXIJnWhdRPN2w4MXAzFyE4CskzhNLUmtpMYro=
github.com/oapi-codegen/runtime v1.1.1/go.mod h1:SK9X900oXmPWilYR5/WKPzt3Kqxn/uS/+lbpREv+eCg=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
Expand Down
12 changes: 12 additions & 0 deletions tools/prepare-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ set -eux
GO_VERSION=1.21.9
GO_BINARY=$(go env GOPATH)/bin/go$GO_VERSION

# temporary pin for https://catalog.redhat.com/search?gs&q=ubi9/go-toolset
function pin() {
# needs Go 1.21.13+
$GO_BINARY get -u github.com/oapi-codegen/oapi-codegen/[email protected]
}

# 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
pin

# Ensure dev tools are installed
which goimports || $GO_BINARY install golang.org/x/tools/cmd/goimports@latest
Expand All @@ -21,4 +28,9 @@ $GO_BINARY fmt -mod=mod ./internal/... ./cmd/...

# ... and that go.mod and go.sum are up to date.
$GO_BINARY mod tidy

# ... and pin specific versions for (slightly older) Go toolbox
pin

# ... and extract modules into vendor subdirectory
$GO_BINARY mod vendor
2 changes: 2 additions & 0 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ github.com/mohae/deepcopy
# github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822
## explicit
github.com/munnerz/goautoneg
# github.com/oapi-codegen/oapi-codegen/v2 v2.3.0
## explicit; go 1.20
# github.com/oapi-codegen/runtime v1.1.1
## explicit; go 1.20
github.com/oapi-codegen/runtime
Expand Down

0 comments on commit c0f3727

Please sign in to comment.