all: refactor goenv.Version to add the git sha1 if needed

Previously all (except one!) usage of goenv.Version manually added the
git sha1 hash, leading to duplicate code. I've moved this to do it all
in one place, to avoid this duplication.
This commit is contained in:
Ayke van Laethem
2023-09-28 15:42:50 +02:00
committed by Ron Evans
parent 2320b18953
commit 5cd8ba2421
5 changed files with 17 additions and 21 deletions
+1 -2
View File
@@ -10,8 +10,7 @@ func Callers(skip int, pc []uintptr) int {
var buildVersion string
// Version returns the Tinygo tree's version string.
// It is the same as goenv.Version, or in case of a development build,
// it will be the concatenation of goenv.Version and the git commit hash.
// It is the same as goenv.Version().
func Version() string {
return buildVersion
}