Commit a23c555d authored by Sietse Ringers's avatar Sietse Ringers
Browse files

feat: make irma version a package constant & log in server startup message

parent 00d4304b
......@@ -5,6 +5,7 @@ import (
"os"
"runtime"
irma "github.com/privacybydesign/irmago"
"github.com/spf13/cobra"
)
......@@ -29,7 +30,7 @@ func init() {
Short: "Print irma version information",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("irma")
fmt.Println("Version: ", "0.3.0")
fmt.Println("Version: ", irma.Version)
fmt.Println("OS/Arg: ", runtime.GOOS+"/"+runtime.GOARCH)
},
})
......
......@@ -9,6 +9,7 @@ import (
"github.com/go-errors/errors"
"github.com/mitchellh/mapstructure"
irma "github.com/privacybydesign/irmago"
"github.com/privacybydesign/irmago/server"
"github.com/privacybydesign/irmago/server/requestorserver"
"github.com/sirupsen/logrus"
......@@ -188,7 +189,11 @@ func configure(cmd *cobra.Command) error {
if viper.GetBool("production") {
mode = "production"
}
logger.WithField("mode", mode).WithField("verbosity", server.Verbosity(viper.GetInt("verbose"))).Info("irma server running")
logger.WithFields(logrus.Fields{
"version": irma.Version,
"mode": mode,
"verbosity": server.Verbosity(viper.GetInt("verbose")),
}).Info("irma server running")
// Now we finally examine and log any error from viper.ReadInConfig()
if err != nil {
......
......@@ -6,6 +6,9 @@ package irma
import "github.com/timshannon/bolthold"
// Version of the IRMA command line and libraries
const Version = "0.3.0"
// go-atum requires a version of bolthold newer than the latest release v1.1, but go-atum does not
// use dep, so by default dep fetches v1.1 which breaks the build. We make bolthold an explicit
// dependency here, so that we can require its version to be sufficiently new in a [[constraint]] in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment