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

Update asset generation to support //go:embed statements listing multiple files #222

Merged
merged 1 commit into from
Sep 28, 2024

Conversation

mortenmj
Copy link
Contributor

@mortenmj mortenmj commented Sep 27, 2024

bb-portal uses gqlgen to generate code for graphql schemas using gqlgen. This tool will write embed statements in this format: //go:embed "schema/scalars.graphql" "schema/ent.graphql" "schema/custom.graphql". This is the offending file: https://github.com/buildbarn/bb-portal/blob/89b62a963a047b852cfc05723452922560611588/internal/graphql/server_gen.go#L1165

Rather than fight with this code generation tool, we can update the "embedded asset generation" workflow step to handle this format. This will just grab the first file that is listed and process that, which is a bit hacky, but it should work for now.

…iple files

bb-portal uses gqlgen to generate code for graphql schemas using gqlgen.
This tool will write embed statements in this format:
//go:embed "schema/scalars.graphql" "schema/ent.graphql" "schema/custom.graphql"

Rather than fight with this code generation tool, we can update the
"embedded asset generation" workflow step to handle this format.
@EdSchouten EdSchouten merged commit 6386ef6 into buildbarn:master Sep 28, 2024
1 check 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