hooks should be able to pass a warning message through to the caller #6394
philpennock
started this conversation in
Ideas, Issue Triage, and General discussions
Replies: 1 comment
-
|
with goreleaser-pro you can: before:
hooks:
- cmd: foobar
output: trueand i'll forward the entire output. but your idea might be worth investigating, yes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
At present, the output from running hooks such as in the
before:section is an all-or-nothing choice: the caller can usegoreleaser --verboseand see them all, or they can see nothing.It would be great if the logwriter handling supported directives in the output stream, to catch messages which really should be shown, without having the hook fail. That way, a hook could issue a deprecation warning just the same as goreleaser can.
An example of prior art which works fairly well: the GitHub Actions Workflow Directives, per https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-commands, and the ability to do something like:
In my particular case, there's an unusual branch which will still work, but I think it's worth having a warning show up even in the goreleaser normal output.
A related thing to consider then would be if hooks should be run with a particular env-var set by Goreleaser, to signal that it's running inside goreleaser, so that a hook could have a preamble such as:
Beta Was this translation helpful? Give feedback.
All reactions