Update version format to match go module version

This commit is contained in:
TeoV
2020-01-10 12:29:18 +02:00
parent e1c822462c
commit ce01ee2f32
3 changed files with 5 additions and 5 deletions

View File

@@ -83,7 +83,7 @@ func (sma *AsteriskAgent) connectAsterisk() (err error) {
sma.astErrChan = make(chan error)
sma.astConn, err = aringo.NewARInGO(fmt.Sprintf("ws://%s/ari/events?api_key=%s:%s&app=%s",
connCfg.Address, connCfg.User, connCfg.Password, CGRAuthAPP), "http://cgrates.org",
connCfg.User, connCfg.Password, fmt.Sprintf("%s %s", utils.CGRateS, utils.VERSION),
connCfg.User, connCfg.Password, fmt.Sprintf("%s@%s", utils.CGRateS, utils.VERSION),
sma.astEvChan, sma.astErrChan, connCfg.ConnectAttempts, connCfg.Reconnects)
if err != nil {
return err

View File

@@ -161,7 +161,7 @@ var (
const (
CGRateS = "CGRateS"
VERSION = "0.9.1~rc8"
VERSION = "v0.9.1~rc8"
DIAMETER_FIRMWARE_REVISION = 918
REDIS_MAX_CONNS = 10
CGRATES = "cgrates"

View File

@@ -662,7 +662,7 @@ func CapitalizedMessage(errMessage string) (capStr string) {
}
func GetCGRVersion() (vers string, err error) {
vers = fmt.Sprintf("%s %s", CGRateS, VERSION)
vers = fmt.Sprintf("%s@%s", CGRateS, VERSION)
if GitLastLog == "" {
return vers, nil
}
@@ -698,8 +698,8 @@ func GetCGRVersion() (vers string, err error) {
if commitHash == "" || commitDate.IsZero() {
return vers, fmt.Errorf("Cannot find commitHash or commitDate information")
}
//CGRateS 0.9.1~rc8 git+73014da (2016-12-30T19:48:09+01:00)
return fmt.Sprintf("%s %s git+%s (%s)", CGRateS, VERSION, commitHash[:7], commitDate.Format(time.RFC3339)), nil
//CGRateS@v0.9.1~rc8-20200110075344-7572e7b11e00
return fmt.Sprintf("%s@%s-%s-%s", CGRateS, VERSION, commitDate.UTC().Format("20060102150405"), commitHash[:12]), nil
}
func NewTenantID(tntID string) *TenantID {