Skip to content

Commit

Permalink
Merge pull request #39 from ar-siddiqui/hotfix/version-check
Browse files Browse the repository at this point in the history
Fix version check bug
  • Loading branch information
ar-siddiqui committed Aug 8, 2022
2 parents 6014ba4 + 156ed14 commit 341bdff
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions curve_number_generator/processing/tools/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,16 @@ def openFileInBrowser():
)


def checkPluginUptodate(plugin_name: str) -> None:
def checkPluginUptodate(plugin_name: str):
# check if new version is available of the plugin
avail_version = checkAvailPluginVersion(plugin_name)
if avail_version != PLUGIN_VERSION:
displayMessage("Newer version of the plugin is available.", "Upgrade", installPlugin)
version_comp = zip(avail_version.split("."), PLUGIN_VERSION.split("."))
for level in version_comp:
if int(level[0]) > int(level[1]):
displayMessage("Newer version of the plugin is available.", "Upgrade", installPlugin)
return
elif int(level[0]) < int(level[1]):
break


def checkAvailPluginVersion(plugin_name: str) -> str:
Expand Down

0 comments on commit 341bdff

Please sign in to comment.