summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main/java
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2021-12-11 20:29:42 +0100
committerMikael Magnusson <mikma@users.sourceforge.net>2023-05-21 22:12:56 +0200
commit1b99edd898eed993cf8d72dd594d4b25bfdcd34e (patch)
treeb626175e5f3b9adb238a72919ec1d51e7f5cff2f /ui/src/main/java
parentc6f2c4ccdb80e72012b0fb3ea90a56b468380ddb (diff)
version: automatically generate version string from tag
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
Diffstat (limited to 'ui/src/main/java')
-rw-r--r--ui/src/main/java/com/wireguard/android/updater/Updater.kt5
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/src/main/java/com/wireguard/android/updater/Updater.kt b/ui/src/main/java/com/wireguard/android/updater/Updater.kt
index dbdbacfe..adcb3836 100644
--- a/ui/src/main/java/com/wireguard/android/updater/Updater.kt
+++ b/ui/src/main/java/com/wireguard/android/updater/Updater.kt
@@ -152,7 +152,10 @@ object Updater {
throw InvalidParameterException("Version has no parts")
parts = ULongArray(strParts.size)
for (i in parts.indices) {
- parts[i] = strParts[i].toULong()
+ if (strParts[i][0] == 'g')
+ parts[i] = strParts[i].substring(1).toULong(16)
+ else
+ parts[i] = strParts[i].toULong()
}
}