godog/mod_version.go
Viacheslav Poturaev 95278dfd39
Automate binary releases (#437)
* Add release assets automation

* Use single module with local replace for examples

* Update CHANGELOG.md

* Allow expected failure for custom formatter example test

* Set version value with ldflags

* Restore artifacts cleanup
2022-01-05 23:00:29 +01:00

16 строки
257 Б
Go

//go:build go1.12
// +build go1.12
package godog
import (
"runtime/debug"
)
func init() {
if info, available := debug.ReadBuildInfo(); available {
if Version == "v0.0.0-dev" && info.Main.Version != "(devel)" {
Version = info.Main.Version
}
}
}