Skip to content
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

Modify the Makefile to pull the go utils from the $GOPATH #352

Merged
merged 3 commits into from
Mar 5, 2024

Conversation

dehort
Copy link
Contributor

@dehort dehort commented Mar 5, 2024

The existing approach doesn't pull the golang utils from the correct location. This approach attempts to pull them (go-jsonschema, code generator, etc) from the $GOPATH. I think this is a better approach.

@dehort
Copy link
Contributor Author

dehort commented Mar 5, 2024

Why is GOPATH not setup already?

@dehort
Copy link
Contributor Author

dehort commented Mar 5, 2024

I pushed a change that sets the GOPATH env var only if it is not set. Is this the right thing? Is that kind of sneaky/not explicit? It fixes the build on github, but maybe I should set the GOPATH env var in the github actions setup.

/home/runner/go/bin/oapi-codegen -generate server,spec -package public -o internal/api/controllers/public/spec.gen.go schema/public.openapi.yaml
/home/runner/go/bin/oapi-codegen -generate types -package public -o internal/api/controllers/public/types.gen.go schema/public.openapi.yaml
# internal API
/home/runner/go/bin/oapi-codegen -generate server,spec -package private -o internal/api/controllers/private/spec.gen.go -import-mapping=./public.openapi.yaml:playbook-dispatcher/internal/api/controllers/public schema/private.openapi.yaml
/home/runner/go/bin/oapi-codegen -generate types -package private -o internal/api/controllers/private/types.gen.go -import-mapping=./public.openapi.yaml:playbook-dispatcher/internal/api/controllers/public schema/private.openapi.yaml

… the Makefile. Make the developer set it up explicitly.
@dehort
Copy link
Contributor Author

dehort commented Mar 5, 2024

@dehort dehort merged commit 5742681 into RedHatInsights:master Mar 5, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants