diff options
author | Allan Wang <me@allanwang.ca> | 2018-10-08 22:46:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-08 22:46:26 -0400 |
commit | 5ceb6a856fa18e772f62dd9cc4f6e2ceaf18064a (patch) | |
tree | 39a49a86b4bcf83d1c6823310dd706ee2dd81614 /app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt | |
parent | 7698d12a5a9898d0f7037b821b22c7892df21daa (diff) | |
download | frost-5ceb6a856fa18e772f62dd9cc4f6e2ceaf18064a.tar.gz frost-5ceb6a856fa18e772f62dd9cc4f6e2ceaf18064a.tar.bz2 frost-5ceb6a856fa18e772f62dd9cc4f6e2ceaf18064a.zip |
Fix/misc (#1130)
* Update bugsnag exception filter
* Rewrite imageactivity to remove file nullability
* Init bugsnag before logging
* Add bugsnag tags
* Update theme for transitioning to post creation
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt index 76af5359..c9a2f285 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/BuildUtils.kt @@ -5,14 +5,14 @@ object BuildUtils { data class Data(val versionName: String, val tail: String) // Builds - const val BUILD_PRODUCTION = "production" - const val BUILD_TEST = "releaseTest" - const val BUILD_GITHUB = "github" - const val BUILD_RELEASE = "release" - const val BUILD_UNNAMED = "unnamed" - + private const val BUILD_PRODUCTION = "production" + private const val BUILD_TEST = "releaseTest" + private const val BUILD_GITHUB = "github" + private const val BUILD_RELEASE = "release" + private const val BUILD_UNNAMED = "unnamed" + fun match(version: String): Data? { - val regex = Regex("([0-9]+\\.[0-9]+\\.[0-9]+)-?([0-9]*-?[0-9a-zA-Z]*)") + val regex = Regex("([0-9]+\\.[0-9]+\\.[0-9]+)-?(.*?)") val result = regex.matchEntire(version)?.groupValues ?: return null return Data(result[1], result[2]) } |