-
Notifications
You must be signed in to change notification settings - Fork 396
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
Support for generated files #501
Comments
It's possible, but I think it would be against The usual recommendation is to use |
I understand the will to follow philosophies, but the reality is that go micro-services using protobuf definition is not an exception. GoRelease supports the pre/post hooks, are you open to a patch? |
I'd much prefer to discuss an abstract design before asking you to write code for us to review. But even then, I don't think I'd be open to accepting a proposal to add pre/post hooks into Is there a reason |
I think the ideal end-state is that make it possible (or the default) to support everything goreleaser does. Right now, it's unclear to me what kind of relationship makes the most sense between the projects. I don't think it make sense to just vendor all of |
My $0.02 tl;dr is that we're based on Go idioms, not goreleaser. The overarching Go guidance around codegen (for better or worse) is to check it in. Things like The real place where I see this being useful is more inner-loop development where juggling tools is annoying, but generally things like proto definitions (or K8s API types) change orders of magnitude less often than the surrounding code. Personally, from a security standpoint I really like the property that |
On inner-loop development, Skaffold supports By combining these hooks with profiles, you can run An example config to achieve this: apiVersion: skaffold/v2beta26
kind: Config
build:
artifacts:
- image: go-generate-build-hook-via-profile
ko: {}
profiles:
- name: inner-loop
activation:
- command: debug
- command: dev
- command: run
patches:
- op: add
path: /build/artifacts/0/hooks
value:
before:
- command: ["go", "generate", "./..."] With this config, Skaffold executes Other commands that are aimed at CI build scenarios, such as |
I'm liking this pattern of |
Is it possible to have ko invoke commands to generate files, notably protoc? This seems to be a very common thing to do with go services.
The text was updated successfully, but these errors were encountered: