From ccd67a82b4e22960e11db3f6573c9968df9515be Mon Sep 17 00:00:00 2001 From: Nikita Zelencov Date: Thu, 23 Jun 2022 11:20:23 +0300 Subject: [PATCH] remove debug checkbox, add tasks for dev builds --- teamcity/settings.kts.in | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/teamcity/settings.kts.in b/teamcity/settings.kts.in index ad64eed..9eaf858 100644 --- a/teamcity/settings.kts.in +++ b/teamcity/settings.kts.in @@ -55,33 +55,35 @@ project { parallel { //Android build(BuildAndroid) + build(BuildAndroidDev) build(UploadArtifactToSlack("Build_Upload_Android", BuildAndroid)) //IOS build(BuildIOS) + build(BuildIOSDev) build(UploadArtifactToSlack("Build_Upload_IOS", BuildIOS)) } } } -object BuildAndroid : BuildAndroidType("", "prod/global_android", "+:*") -object BuildIOS : BuildIOSType("", "prod/global_ios", "+:*") +object BuildAndroid : BuildAndroidType("", "prod/global_android") +object BuildAnroidDev : BuildAndroidType("Dev", "dev/global_android") +object BuildIOS : BuildIOSType("", "prod/global_ios") +object BuildIOSDev : BuildIOSType("Dev", "dev/global_ios") -open class BuildAndroidType(proj : String, env : String, branch: String) : +open class BuildAndroidType(name_suffix : String, environment : String) : BuildType({ - name = "Build Android" + name = "Build Android " + name_suffix var artifact_rules : String = "*.apk\n*.aab" artifactRules = artifact_rules vcs { root(GitProjectRepo) - branchFilter = branch + branchFilter = "+:*" } params { - checkbox("build.env.debug", "false", label = "Debug", - description = "Build developer version.", checked = "true") param("build.env.buildName", "%system.teamcity.buildConfName%") param("build.env.workDir", "%system.teamcity.build.workingDir%") param("build.env.artifactRules", artifact_rules) @@ -103,12 +105,9 @@ open class BuildAndroidType(proj : String, env : String, branch: String) : } } - - var gamectl_environment = if("%build.env.debug%" == "true") env.replace("global", "dev") else env - steps { script { - name = "Setup skeletor" + name = "Setup Skeletor" scriptContent = "./setup.sh" } script { @@ -121,7 +120,7 @@ open class BuildAndroidType(proj : String, env : String, branch: String) : } script { name = "Produce" - scriptContent = "./gamectl --env=" + gamectl_environment + " build_android" + scriptContent = "./gamectl --env=" + environment } } @@ -133,21 +132,19 @@ open class BuildAndroidType(proj : String, env : String, branch: String) : {} -open class BuildIOSType(proj : String, env : String, branch : String) : +open class BuildIOSType(name_suffix : String, environment : String) : BuildType({ - name = "Build IOS" + name = "Build IOS " + name_suffix var artifact_rules : String = "*.ipa" artifactRules = artifact_rules vcs { root(GitProjectRepo) - branchFilter = branch + branchFilter = "+:*" } params { - checkbox("build.env.debug", "false", label = "Debug", - description = "Build developer version.", checked = "true") param("build.env.buildName", "%system.teamcity.buildConfName%") param("build.env.workDir", "%system.teamcity.build.workingDir%") param("build.env.artifactRules", artifact_rules) @@ -169,11 +166,9 @@ open class BuildIOSType(proj : String, env : String, branch : String) : } } - var gamectl_environment = if("%build.env.debug%" == "true") env.replace("global", "dev") else env - steps { script { - name = "Setup skeletor" + name = "Setup Skeletor" scriptContent = "./setup.sh" } script { @@ -186,7 +181,7 @@ open class BuildIOSType(proj : String, env : String, branch : String) : } script { name = "Produce" - scriptContent = "./gamectl --env=" + gamectl_environment + " build_ios" + scriptContent = "./gamectl --env=" + environment } }