diff --git a/setup.py b/setup.py index 4decb013..848a4b21 100644 --- a/setup.py +++ b/setup.py @@ -17,13 +17,12 @@ 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", diff --git a/thingsboard_gateway/gateway/constants.py b/thingsboard_gateway/gateway/constants.py index 59e9fb1a..3364e211 100644 --- a/thingsboard_gateway/gateway/constants.py +++ b/thingsboard_gateway/gateway/constants.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -VERSION = "3.2" # Service constants diff --git a/thingsboard_gateway/tb_utility/tb_updater.py b/thingsboard_gateway/tb_utility/tb_updater.py index a338e2d4..bb228021 100644 --- a/thingsboard_gateway/tb_utility/tb_updater.py +++ b/thingsboard_gateway/tb_utility/tb_updater.py @@ -23,10 +23,8 @@ 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" @@ -40,7 +38,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": f"v{VERSION}", "latest_version": f"v{VERSION}"} + self.__version = {"current_version": "0", "latest_version": "0"} self.__instance_id = str(uuid1()) self.__platform = system()