Cray-HPE / gru

A utility for reading and modifying BMCs (e.g. iLO, RMMC) using RedFish (gofish).
MIT License
6 stars 2 forks source link

Fixes #30 `GitTreeState` is always "dirty" when building from GitHub Actions #31

Closed rustydb closed 11 months ago

rustydb commented 11 months ago

Summary and Scope

Issue Type

This works around https://github.com/wangyoucao577/go-release-action/issues/143 by removing the downloaded Go source code before running make. The downloaded source code was triggering git status -s to report the repository as dirty. I ran a debug build that shows go-linux.tar.gz as the culprit:

After resolving that and testing a bogus v0.0.5a2 tag, I observed a "clean" GitTreeState:

I've made an upstream PR, but in the meantime (or in case it never merges) we can fix this by just removing the downloaded file.

This also fixes a non-issue, where the current go.mod file needed go mod tidy ran. make invokes go mod tidy which does modify go.mod with the current HEAD, however this does NOT cause the problem. GitTreeState is resolved before go mod tidy is invoked during make, however it's kosher/proper to clean this up regardless.

Risks and Mitigations

This will fix official release's version strings, giving more confidence that the app was built cleanly.