-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/errtrace: Uniquely identify the binary for toolexec version (#93)
The toolexec version should be bumped on any change to the code rewriting. Doing this manually is error-prone, so instead, use a string that uniquely identifies the errtrace binary. Note that every time this version changes, it means the build cache can't be used so it's important to use a stable value. We default to the git SHA in the debug build info (vcs.revision) if the binary is build from a clean state (vcs.modified=false). Otherwise, we use the MD5 of the binary being executed. This is more expensive than the SHA to compute, so we prefer the SHA.
- Loading branch information
Showing
1 changed file
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters