package appversion

import (
	"github.com/tech/sendico/pkg/version"
	vf "github.com/tech/sendico/pkg/version/factory"
)

// Build information populated at build time.
var (
	Version   string
	Revision  string
	Branch    string
	BuildUser string
	BuildDate string
)

// Create initialises a version.Printer with the build details for this service.
func Create() version.Printer {
	info := version.Info{
		Program:   "Sendico Billing Documents Service",
		Revision:  Revision,
		Branch:    Branch,
		BuildUser: BuildUser,
		BuildDate: BuildDate,
		Version:   Version,
	}

	return vf.Create(&info)
}
