forked from Silverfish/proton-bridge
refactor: dedicated constants package, no explicit bridge version
This commit is contained in:
committed by
Jakub Cuth
parent
32ca7b3903
commit
522cadb8b1
@ -22,6 +22,7 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/ProtonMail/proton-bridge/pkg/constants"
|
||||
"github.com/cucumber/godog"
|
||||
"github.com/cucumber/godog/colors"
|
||||
)
|
||||
@ -33,6 +34,9 @@ var opt = godog.Options{ //nolint[gochecknoglobals]
|
||||
|
||||
func init() { //nolint[gochecknoinits]
|
||||
godog.BindFlags("godog.", flag.CommandLine, &opt)
|
||||
|
||||
// This would normally be done using ldflags but `godog` command doesn't support that.
|
||||
constants.Version = os.Getenv("VERSION")
|
||||
}
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
@ -46,5 +50,6 @@ func TestMain(m *testing.M) {
|
||||
if st := m.Run(); st > status {
|
||||
status = st
|
||||
}
|
||||
|
||||
os.Exit(status)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user