1
0
mirror of https://github.com/thingsboard/thingsboard-gateway synced 2025-10-26 22:31:42 +08:00

Fixed version resolving

This commit is contained in:
samson0v
2023-01-05 11:19:42 +02:00
parent 5e5d1b5000
commit f2bbe4e353
3 changed files with 7 additions and 3 deletions

View File

@@ -17,12 +17,13 @@
from setuptools import setup
from os import path
from thingsboard_gateway.gateway.constants import VERSION
this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
VERSION = "3.2"
setup(
version=VERSION,
name="thingsboard-gateway",

View File

@@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
VERSION = "3.2"
# Service constants

View File

@@ -23,8 +23,10 @@ from pkg_resources import get_distribution
from requests import ConnectionError, post
from simplejson import loads
from thingsboard_gateway.gateway.constants import VERSION
from thingsboard_gateway.tb_utility.tb_utility import TBUtility
log = getLogger("service")
UPDATE_SERVICE_BASE_URL = "https://updates.thingsboard.io"
@@ -38,7 +40,7 @@ class TBUpdater(Thread):
self.__version = {"current_version": get_distribution('thingsboard_gateway').version,
"latest_version": get_distribution('thingsboard_gateway').version}
except DistributionNotFound:
self.__version = {"current_version": "0", "latest_version": "0"}
self.__version = {"current_version": f"v{VERSION}", "latest_version": f"v{VERSION}"}
self.__instance_id = str(uuid1())
self.__platform = system()