Assert build.number is present if deployVersion is

KTI-1454 Fail instead of producing the wrong artifacts
This commit is contained in:
cristiangarcia
2023-11-16 11:55:22 +01:00
committed by Space Team
parent 1832f5a3f7
commit 7a267afeae
+3
View File
@@ -62,6 +62,9 @@ pill {
val isTeamcityBuild = project.kotlinBuildProperties.isTeamcityBuild val isTeamcityBuild = project.kotlinBuildProperties.isTeamcityBuild
val defaultSnapshotVersion: String by extra val defaultSnapshotVersion: String by extra
findProperty("deployVersion")?.let {
assert(findProperty("build.number") != null) { "`build.number` parameter is expected to be explicitly set with the `deployVersion`" }
}
val buildNumber by extra(findProperty("build.number")?.toString() ?: defaultSnapshotVersion) val buildNumber by extra(findProperty("build.number")?.toString() ?: defaultSnapshotVersion)
val kotlinVersion by extra( val kotlinVersion by extra(
findProperty("deployVersion")?.toString()?.let { deploySnapshotStr -> findProperty("deployVersion")?.toString()?.let { deploySnapshotStr ->