Skip to content

Commit a4156d1

Browse files
authored
Fix ci (#1020)
**Background** [CI is a bit broken](https://github.com/flipperdevices/Flipper-Android-App/actions/runs/12936026554) because of autogenerated app version **Changes** - Add validation for desktop version **Test plan** - Merge and see green ci
1 parent e74bfb3 commit a4156d1

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# 1.8.2 - In Progress
44

55
- [Feature] Migrate app onto new BLE api
6+
- [Fix] Fix CI for desktop sample app
67

78

89
# 1.8.1

components/bridge/connection/sample/desktop/build.gradle.kts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@ compose.desktop {
3434
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
3535
packageName = "Flipper App"
3636
packageVersion = project.VERSION_NAME
37+
.split(".")
38+
.let { semVers ->
39+
// minimum major version for desktop is 1
40+
val major = semVers.getOrNull(0)
41+
?.toIntOrNull()
42+
?.coerceAtLeast(1)
43+
?: 1
44+
val minor = semVers.getOrNull(1) ?: 0
45+
// If generated on CI - getting autogenerated last number first
46+
val patch = semVers.getOrNull(3)
47+
?: semVers.getOrNull(2)
48+
?: 0
49+
"${major}.${minor}.${patch}"
50+
}
3751
}
3852
}
3953
}

0 commit comments

Comments
 (0)