Skip to content

CI: propagate code generation failures - #1952

Open
mattjohnsonpint wants to merge 1 commit into
stretchr:masterfrom
mattjohnsonpint:mjp/ci-gogenerate-errors
Open

CI: propagate code generation failures#1952
mattjohnsonpint wants to merge 1 commit into
stretchr:masterfrom
mattjohnsonpint:mjp/ci-gogenerate-errors

Conversation

@mattjohnsonpint

Copy link
Copy Markdown
Contributor

Summary

CI currently tests the value of GOMOD if it exists, but it doesn't ensure that go env succeeds.

Changes

Update .ci.gogenerate.sh such that if go env GOMOD fails, the script fails immediately.

Motivation

This is just fixing an edge case for a possible false positive in CI.

Without errexit, a failed go generate command can be followed by a clean git diff and a successful script exit. Evaluate GOMOD separately so a failed go env command is propagated too.
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.

3 participants