Use the pbr version of the package as plugin version

This commit is contained in:
Hemna 2021-11-09 11:33:10 -05:00
parent cac8807074
commit 1dc0744ac0
2 changed files with 7 additions and 1 deletions

View File

@ -0,0 +1,4 @@
import pbr.version
__version__ = pbr.version.VersionInfo("aprsd_telegram_plugin").version_string()

View File

@ -6,6 +6,8 @@ import time
from aprsd import messaging, objectstore, plugin, threads, trace
from telegram.ext import Filters, MessageHandler, Updater
import aprsd_telegram_plugin
LOG = logging.getLogger("APRSD")
@ -65,7 +67,7 @@ class TelegramUsers(objectstore.ObjectStoreMixin):
class TelegramChatPlugin(plugin.APRSDRegexCommandPluginBase):
version = "1.0"
version = aprsd_telegram_plugin.__version__
# Look for any command that starts with w or W
command_regex = "^[tT][gG]"
# the command is for ?