chore: inline build version within PanicReporter

This commit is contained in:
Mike Greenberg 2021-09-22 04:55:39 -04:00
parent 926858aeec
commit b3816bc2dc

View File

@ -79,11 +79,7 @@ func writeAppVersion(file string) {
}
defer f.Close() //nolint:errcheck
ignoreCommitBefore := os.Getenv("LOTUS_VERSION_IGNORE_COMMIT")
os.Setenv("LOTUS_VERSION_IGNORE_COMMIT", "") //nolint:errcheck
defer os.Setenv("LOTUS_VERSION_IGNORE_COMMIT", ignoreCommitBefore) //nolint:errcheck
versionString := []byte(UserVersion() + "\n")
versionString := []byte(BuildVersion + buildType() + CurrentCommit + "\n")
if _, err := f.Write(versionString); err != nil {
panicLog.Error(err.Error())
}