update version scheme, add __version__ in tisbackup.py and add epoch to deb file

This commit is contained in:
Denis Cardon 2020-12-08 12:08:34 +01:00
parent 23ec9e70ba
commit a64121561b
3 changed files with 11 additions and 6 deletions

View File

@ -1,10 +1,10 @@
Package: tis-tisbackup
Version: VERSION
Version: 1:__VERSION__
Section: base
Priority: optional
Architecture: all
Depends: unzip, ssh, rsync, python-paramiko, python-pyvmomi, python-pexpect, python-flask,python-simplejson
Maintainer: Tranquil-IT-Systems <admin@tranquil-it-systems.fr>
Maintainer: Tranquil-IT <technique@tranquil.it>
Description: TISBackup backup management
Homepage: http://www.tranquil-it-systems.fr
Homepage: https://www.tranquil.it

View File

@ -1,5 +1,8 @@
#!/usr/bin/env bash
VERSION=`git rev-list HEAD --count`
VERSION_SHORT=$(cat ../tisbackup.py | grep "__version__" | cut -d "=" -f 2 | sed 's/"//g')
GIT_COUNT=`git rev-list HEAD --count`
VERSION="${VERSION_SHORT}.${GIT_COUNT}"
rm -f *.deb
rm -Rf builddir
@ -8,7 +11,7 @@ mkdir builddir/DEBIAN
cp ./control ./builddir/DEBIAN
cp ./postinst ./builddir/DEBIAN
sed "s/VERSION/$VERSION/" -i ./builddir/DEBIAN/control
sed "s/__VERSION__/$VERSION/" -i ./builddir/DEBIAN/control
mkdir -p builddir/opt/tisbackup/
mkdir -p ./builddir/usr/lib/systemd/system/
@ -25,6 +28,6 @@ rsync -aP ../lib/huey/bin/huey_consumer.py ./builddir/opt/tisbackup/
chmod 755 /opt/tisbackup/tisbackup.py
dpkg-deb --build builddir tis-tisbackup-${VERSION}.deb
dpkg-deb --build builddir tis-tisbackup-1:${VERSION}.deb

View File

@ -46,6 +46,8 @@ from libtisbackup.copy_vm_xcp import copy_vm_xcp
from libtisbackup.backup_sqlserver import backup_sqlserver
from libtisbackup.backup_samba4 import backup_samba4
__version__="1.1"
usage="""\
%prog -c configfile action