From 9cbee665b80fcb35f2d5b6b71e591865525f3827 Mon Sep 17 00:00:00 2001 From: nickolasdaniel Date: Wed, 2 Feb 2022 16:54:59 +0200 Subject: [PATCH] Changed the build script and GetCGRVersion() to get the CommitDate instead of AuthorDate --- build.sh | 2 +- utils/coreutils.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 5ec824b60..658ff92f7 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,7 @@ #! /usr/bin/env sh echo "Building CGRateS ..." -GIT_LAST_LOG=$(git log -1 | tr -d "'") +GIT_LAST_LOG=$(git log -1 --format=fuller | tr -d "'") GIT_TAG_LOG=$(git tag -l --points-at HEAD) diff --git a/utils/coreutils.go b/utils/coreutils.go index 4bfc14d86..4086b9ead 100644 --- a/utils/coreutils.go +++ b/utils/coreutils.go @@ -736,7 +736,7 @@ func GetCGRVersion() (vers string, err error) { commitHash = commitSplt[1] continue } - if strings.HasPrefix(ln, "Date:") { + if strings.HasPrefix(ln, "CommitDate:") { dateSplt := strings.Split(ln, ": ") if len(dateSplt) != 2 { return vers, fmt.Errorf("Building version - cannot split commit date")