-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: pin oapi-gen until toolbox gets 1.21.13
- Loading branch information
Showing
4 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters