-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: bump oapi-codegen to 2.4.1 #1355
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ dnf-json | |
local.env | ||
__debug* | ||
coverage* | ||
/bin |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
//go:generate go run -mod=mod github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.3.0 --config client.cfg.yaml openapi.v2.yml | ||
//go:generate go run -mod=mod github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --config client.cfg.yaml openapi.v2.yml | ||
|
||
// Generated OpenAPI clients for the Composer service. | ||
package composer |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
//go:generate go run -mod=mod github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.3.0 --config client.cfg.yaml content-sources.v1.json | ||
//go:generate go run -mod=mod github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --config client.cfg.yaml content-sources.v1.json | ||
|
||
// Generated OpenAPI clients for the Content Sources service. | ||
package content_sources |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
//go:generate go run -mod=mod github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.3.0 --config client.cfg.yml provisioning.v1.yml | ||
//go:generate go run -mod=mod github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --config client.cfg.yml provisioning.v1.yml | ||
|
||
// Generated OpenAPI clients for the Provisioning service. | ||
package provisioning |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
//go:generate go run -mod=mod github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.3.0 --config client.cfg.yml recommendations.v3.json | ||
//go:generate go run -mod=mod github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen --config client.cfg.yml recommendations.v3.json | ||
package recommendations |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,20 +2,20 @@ | |
set -eux | ||
|
||
GO_VERSION=1.21.9 | ||
OAPI_VERSION=2.4.1 | ||
|
||
GO_BINARY=$(go env GOPATH)/bin/go$GO_VERSION | ||
OAPI_VERSION=2.3.0 | ||
TOOLS_PATH="$(realpath "$(dirname "$0")/../bin")" | ||
|
||
# this is the official way to get a different version of golang | ||
# see https://go.dev/doc/manage-install | ||
# Install Go SDK | ||
go install golang.org/dl/go$GO_VERSION@latest | ||
$GO_BINARY download | ||
|
||
# Ensure dev tools are installed | ||
which goimports || $GO_BINARY install golang.org/x/tools/cmd/goimports@latest | ||
which goimports >/dev/null || GOBIN=$TOOLS_PATH $GO_BINARY install golang.org/x/tools/cmd/goimports@latest | ||
("$TOOLS_PATH/oapi-codegen" -version | grep "$OAPI_VERSION" >/dev/null) || GOBIN=$TOOLS_PATH $GO_BINARY install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v$OAPI_VERSION | ||
|
||
# Ensure that all code has been regenerated from its sources with the pinned oapi version | ||
git grep -l "go:generate.*github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen" | grep -v prepare-source.sh | xargs sed -i "s|github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen[[email protected]]*|github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v$OAPI_VERSION|g" | ||
$GO_BINARY generate -mod=mod ./... | ||
GOBIN=$TOOLS_PATH $GO_BINARY generate -x -mod=mod ./... | ||
|
||
# ... the code is formatted correctly, ... | ||
goimports -w internal cmd | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will which still work here? $TOOLS_PATH wouldn't be part of the user's path.