diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2021-12-11 20:29:42 +0100 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-05-09 00:27:24 +0200 |
commit | 1b6bc7a18f614bc9e1aad6a234d5ad4a399be56e (patch) | |
tree | 38b92635cd3c9e3b3e7662b715f39642b7ff24ce /ui/src/main/java/com/wireguard/android | |
parent | c3f6906309054c9018d3dcf39211b49a941ded9d (diff) |
version: automatically generate version string from tag
Signed-off-by: Mikael Magnusson <mikma@users.sourceforge.net>
Diffstat (limited to 'ui/src/main/java/com/wireguard/android')
-rw-r--r-- | ui/src/main/java/com/wireguard/android/updater/Updater.kt | 7 |
1 files changed, 5 insertions, 2 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 fabfae92..6781a60d 100644 --- a/ui/src/main/java/com/wireguard/android/updater/Updater.kt +++ b/ui/src/main/java/com/wireguard/android/updater/Updater.kt @@ -146,7 +146,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() } } @@ -412,4 +415,4 @@ object Updater { context.startActivity(start) } } -}
\ No newline at end of file +} |