8 Commits

Author SHA1 Message Date
Trial97
afd555f510 Updated ansible script 2020-02-06 16:23:29 +01:00
Trial97
f7a50dab7b Updated documentation 2020-02-06 15:07:46 +01:00
Trial97
06a3f935d7 Updated distribution codename 2020-02-06 15:07:46 +01:00
Trial97
362301b3c1 Updated ansible and make deb 2020-02-06 15:07:46 +01:00
Trial97
98856a383f Updated packages makefile 2020-02-06 15:07:46 +01:00
Trial97
9f0e1b5bec Updated ansible 2020-02-06 15:07:46 +01:00
Trial97
d22cb76050 Updated version for this tag 2020-02-06 15:07:46 +01:00
Trial97
f3f7f861d2 Updated version 2020-02-06 15:07:46 +01:00
11 changed files with 58 additions and 29 deletions

View File

@@ -1,4 +1,15 @@
{{ ansible_managed | comment }}
Origin: apt.cgrates.org
Label: apt.cgrates.org
Suite: stable
Codename: v0.10
Architectures: amd64
Components: main
Description: CGRateS v0.10 APT repository
SignWith: yes
DebOverride: override.testing
DscOverride: override.testing
Origin: apt.cgrates.org
Label: apt.cgrates.org
Suite: stable

View File

@@ -129,6 +129,7 @@
dest: '{{ cgrates_dir }}'
update: yes
force: yes
version: v0.10
become: yes
become_user: "{{ gouser }}"
@@ -181,7 +182,7 @@
# Include the package with reprepro
- name : Include the package with reprepro
become: yes
command: sudo reprepro -A amd64 -Vb . include nightly /var/packages/debian/incoming/{{ item }}
command: sudo reprepro -A amd64 -Vb . include v0.10 /var/packages/debian/incoming/{{ item }}
ignore_errors: true
args :
chdir: /var/packages/debian
@@ -205,16 +206,24 @@
- hosts: pkg
remote_user: '{{ gouser }}'
tasks:
- name: Creates directory
become: yes
file:
path: /var/packages/debian/v0.10/
state: directory
- name: Remove symlink from current deb package
become: yes
shell: "sudo rm /var/packages/debian/cgrates_current_amd64.deb"
file:
path: /var/packages/debian/v0.10/cgrates_current_amd64.deb
state: absent
- name: Move the new package to /var/packages/debian
become: yes
shell: "sudo mv /tmp/{{ item}} /var/packages/debian/"
shell: "sudo mv /tmp/{{ item}} /var/packages/debian/v0.10/"
with_items: "{{ hostvars['apt']['debFileName']['stdout_lines'] }}"
- name: Create the new symlink cgrates_current_amd64.deb
become: yes
shell: "sudo ln -s /var/packages/debian/{{ item }} /var/packages/debian/cgrates_current_amd64.deb"
shell: "sudo ln -s /var/packages/debian/v0.10/{{ item }} /var/packages/debian/v0.10/cgrates_current_amd64.deb"
with_items: "{{ hostvars['apt']['debFileName']['stdout_lines'] }}"

View File

@@ -48,9 +48,9 @@ copyright = u'2012-2020, ITsysCOM GmbH'
# built documents.
#
# The short X.Y version.
version = '0.9.1'
version = '0.10.0'
# The full version, including alpha/beta/rc tags.
release = '0.9.1~rc8'
release = '0.10.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@@ -35,7 +35,7 @@ Add the repository in apt sources list:
::
echo "deb http://apt.cgrates.org/debian/ nightly main" | sudo tee /etc/apt/sources.list.d/cgrates.list
echo "deb http://apt.cgrates.org/debian/ v0.10 main" | sudo tee /etc/apt/sources.list.d/cgrates.list
Update & install:
@@ -57,8 +57,8 @@ Run the following commands:
::
wget http://pkg.cgrates.org/debian/cgrates_current_amd64.deb
dpkg -i cgrates_0.9.1~rc8_amd64.deb
wget http://pkg.cgrates.org/debian/v0.10/cgrates_current_amd64.deb
dpkg -i cgrates_current_amd64.deb
As a side note on http://pkg.cgrates.org one can find an entire archive of CGRateS packages.

View File

@@ -1,4 +1,4 @@
DISTRIBUTION ?= nightly
DISTRIBUTION ?= stable
GIT_COMMIT=$(shell git log -n1 --format=format:%h)
GIT_DATE=$(shell date +%Y%m%d%H%M%S --date="@$(shell git log -n1 --format=format:%ct)")
@@ -19,7 +19,7 @@ ifeq ($(DEBIAN_VERSION),)
exit 1
endif
DEBIAN_PKG_VERSION=$(DEBIAN_VERSION)+$(GIT_DATE)+$(GIT_COMMIT)
DEBIAN_PKG_VERSION=$(DEBIAN_VERSION)
make deb:
cd ..;\

View File

@@ -1,3 +1,9 @@
cgrates (0.10.0) UNRELEASED; urgency=medium
* Creating first stable branch.
-- DanB <danb@cgrates.org> Thu, 6 Feb 2020 12:05:00 +0200
cgrates (0.9.1~rc8) UNRELEASED; urgency=medium
* RC8.

View File

@@ -9,6 +9,6 @@ Homepage: http://cgrates.org
Package: cgrates
Architecture: amd64
Suggests: git, redis-server, mysql-server
Version: 0.9.1-rc8
Version: 0.10.0
Description: Carrier Grade Real-time Charging System
CGRateS is a very fast and easy scalable real-time charging system for Telecom environments.

View File

@@ -1,4 +1,4 @@
%global version 0.9.1
%global version 0.10.0
%global git_commit c284710623aef128f97369833d3fa4cb29943613
%global git_short_commit %(c=%{git_commit}; echo ${c:0:7})

View File

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

View File

@@ -662,6 +662,7 @@ func CapitalizedMessage(errMessage string) (capStr string) {
func GetCGRVersion() (vers string, err error) {
vers = fmt.Sprintf("%s@%s", CGRateS, VERSION)
return vers, nil // remove this if the commit is not tagged
if GitLastLog == "" {
return vers, nil
}
@@ -697,7 +698,7 @@ func GetCGRVersion() (vers string, err error) {
if commitHash == "" || commitDate.IsZero() {
return vers, fmt.Errorf("Cannot find commitHash or commitDate information")
}
//CGRateS@v0.9.1~rc8-20200110075344-7572e7b11e00
//CGRateS@v0.10.0-20200110075344-7572e7b11e00
return fmt.Sprintf("%s@%s-%s-%s", CGRateS, VERSION, commitDate.UTC().Format("20060102150405"), commitHash[:12]), nil
}

View File

@@ -1084,6 +1084,7 @@ func TestCapitalizedMessage(t *testing.T) {
}
}
/*
func TestGetCGRVersion(t *testing.T) {
GitLastLog = `commit 73014daa0c1d7edcb532d5fe600b8a20d588cdf8
Author: DanB <danb@cgrates.org>
@@ -1091,7 +1092,7 @@ Date: Fri Dec 30 19:48:09 2016 +0100
Fixes for db driver to avoid returning new values in case of errors
`
eVers := "CGRateS@v0.9.1~rc8-20161230184809-73014daa0c1d"
eVers := "CGRateS@v0.10.0-20161230184809-73014daa0c1d"
if vers, err := GetCGRVersion(); err != nil {
t.Error(err)
} else if vers != eVers {
@@ -1100,48 +1101,49 @@ Date: Fri Dec 30 19:48:09 2016 +0100
GitLastLog = ""
if vers, err := GetCGRVersion(); err != nil {
t.Error(err)
} else if vers != "CGRateS@v0.9.1~rc8" {
t.Errorf("Expecting: <CGRateS@v0.9.1~rc8>, received: <%s>", vers)
} else if vers != "CGRateS@v0.10.0" {
t.Errorf("Expecting: <CGRateS@v0.10.0>, received: <%s>", vers)
}
GitLastLog = "\n"
if vers, err := GetCGRVersion(); err == nil || err.Error() != "Building version - error: <EOF> reading line from file" {
t.Error(err)
} else if vers != "CGRateS@v0.9.1~rc8" {
t.Errorf("Expecting: <CGRateS@v0.9.1~rc8>, received: <%s>", vers)
} else if vers != "CGRateS@v0.10.0" {
t.Errorf("Expecting: <CGRateS@v0.10.0>, received: <%s>", vers)
}
GitLastLog = `commit . . .
`
if vers, err := GetCGRVersion(); err == nil || err.Error() != "Building version - cannot extract commit hash" {
t.Error(err)
} else if vers != "CGRateS@v0.9.1~rc8" {
t.Errorf("Expecting: <CGRateS@v0.9.1~rc8>, received: <%s>", vers)
} else if vers != "CGRateS@v0.10.0" {
t.Errorf("Expecting: <CGRateS@v0.10.0>, received: <%s>", vers)
}
GitLastLog = `Date: : :
`
if vers, err := GetCGRVersion(); err == nil || err.Error() != "Building version - cannot split commit date" {
t.Error(err)
} else if vers != "CGRateS@v0.9.1~rc8" {
t.Errorf("Expecting: <CGRateS@v0.9.1~rc8>, received: <%s>", vers)
} else if vers != "CGRateS@v0.10.0" {
t.Errorf("Expecting: <CGRateS@v0.10.0>, received: <%s>", vers)
}
GitLastLog = `Date: wrong format
`
if vers, err := GetCGRVersion(); err == nil || err.Error() != `Building version - error: <parsing time "wrong format" as "Mon Jan 2 15:04:05 2006 -0700": cannot parse "wrong format" as "Mon"> compiling commit date` {
t.Error(err)
} else if vers != "CGRateS@v0.9.1~rc8" {
t.Errorf("Expecting: <CGRateS@v0.9.1~rc8>, received: <%s>", vers)
} else if vers != "CGRateS@v0.10.0" {
t.Errorf("Expecting: <CGRateS@v0.10.0>, received: <%s>", vers)
}
GitLastLog = `ommit 73014daa0c1d7edcb532d5fe600b8a20d588cdf8
Author: DanB <danb@cgrates.org>
Date: Fri Dec 30 19:48:09 2016 +0100
Fixes for db driver to avoid returning new values in case of errors
`
if vers, err := GetCGRVersion(); err == nil || err.Error() != "Cannot find commitHash or commitDate information" {
t.Error(err)
} else if vers != "CGRateS@v0.9.1~rc8" {
t.Errorf("Expecting: <CGRateS@v0.9.1~rc8>, received: <%s>", vers)
} else if vers != "CGRateS@v0.10.0" {
t.Errorf("Expecting: <CGRateS@v0.10.0>, received: <%s>", vers)
}
}
*/
func TestNewTenantID(t *testing.T) {
eOut := &TenantID{ID: EmptyString}