From ce6525a0334702941d6c02cd989492d6c4949700 Mon Sep 17 00:00:00 2001
From: Andrew Olsen
Date: Tue, 5 Dec 2023 13:36:16 +1300
Subject: [PATCH] Set current Kart to 0.15.0
---
.github/workflows/testing.yml | 2 +-
kart/kartapi.py | 14 ++++++--------
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml
index 3a5bec5..a767694 100644
--- a/.github/workflows/testing.yml
+++ b/.github/workflows/testing.yml
@@ -21,7 +21,7 @@ jobs:
env:
QGIS_TEST_VERSION: ${{ matrix.qgis_version }}
- KART_VERSION: "0.14.2"
+ KART_VERSION: "0.15.0"
steps:
- name: Checkout
diff --git a/kart/kartapi.py b/kart/kartapi.py
index d25a3d0..348a9a0 100644
--- a/kart/kartapi.py
+++ b/kart/kartapi.py
@@ -38,7 +38,7 @@
MINIMUM_SUPPORTED_VERSION = "0.14.0"
-CURRENT_VERSION = "0.14.2"
+CURRENT_VERSION = "0.15.0"
class KartException(Exception):
@@ -104,8 +104,9 @@ def kartExecutable() -> str:
def checkKartInstalled(showMessage=True, useCache=True):
version = installedVersion(useCache)
- supported_major, supported_minor, supported_patch = \
- MINIMUM_SUPPORTED_VERSION.split(".")
+ supported_version_tuple = tuple(
+ int(p) for p in MINIMUM_SUPPORTED_VERSION.split(".")[:3]
+ )
msg = ""
if version is None:
msg = (
@@ -116,11 +117,8 @@ def checkKartInstalled(showMessage=True, useCache=True):
"https://kartproject.org.
"
)
else:
- major, minor, patch = version.split(".")[:3]
- versionOk = major == supported_major and (
- (minor > supported_minor)
- or (minor == supported_minor and patch >= supported_patch)
- )
+ version_tuple = tuple(int(p) for p in version.split(".")[:3])
+ versionOk = version_tuple >= supported_version_tuple
if not versionOk:
msg = (
f"The installed Kart version ({version}) is not"