summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main
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-10-19 22:57:07 +0200
commitf6f8bdd252cc2af7bf34fe8efd87de97068d9c31 (patch)
tree3ec1a48e670a428c1a817286c75a3fd6de496132 /ui/src/main
parent0a8de709b6ee34af39a96d62ec825d0daadd964d (diff)
version: automatically generate version string from tag
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
Diffstat (limited to 'ui/src/main')
-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 651e3cd7..87adad96 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()
}
}