remove debug checkbox, add tasks for dev builds

This commit is contained in:
Зеленцов Никита 2022-06-23 11:20:23 +03:00
parent b78c5a4c1e
commit ccd67a82b4
1 changed files with 16 additions and 21 deletions

View File

@ -55,33 +55,35 @@ project {
parallel { parallel {
//Android //Android
build(BuildAndroid) build(BuildAndroid)
build(BuildAndroidDev)
build(UploadArtifactToSlack("Build_Upload_Android", BuildAndroid)) build(UploadArtifactToSlack("Build_Upload_Android", BuildAndroid))
//IOS //IOS
build(BuildIOS) build(BuildIOS)
build(BuildIOSDev)
build(UploadArtifactToSlack("Build_Upload_IOS", BuildIOS)) build(UploadArtifactToSlack("Build_Upload_IOS", BuildIOS))
} }
} }
} }
object BuildAndroid : BuildAndroidType("", "prod/global_android", "+:*") object BuildAndroid : BuildAndroidType("", "prod/global_android")
object BuildIOS : BuildIOSType("", "prod/global_ios", "+:*") 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({ BuildType({
name = "Build Android" name = "Build Android " + name_suffix
var artifact_rules : String = "*.apk\n*.aab" var artifact_rules : String = "*.apk\n*.aab"
artifactRules = artifact_rules artifactRules = artifact_rules
vcs { vcs {
root(GitProjectRepo) root(GitProjectRepo)
branchFilter = branch branchFilter = "+:*"
} }
params { params {
checkbox("build.env.debug", "false", label = "Debug",
description = "Build developer version.", checked = "true")
param("build.env.buildName", "%system.teamcity.buildConfName%") param("build.env.buildName", "%system.teamcity.buildConfName%")
param("build.env.workDir", "%system.teamcity.build.workingDir%") param("build.env.workDir", "%system.teamcity.build.workingDir%")
param("build.env.artifactRules", artifact_rules) 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 { steps {
script { script {
name = "Setup skeletor" name = "Setup Skeletor"
scriptContent = "./setup.sh" scriptContent = "./setup.sh"
} }
script { script {
@ -121,7 +120,7 @@ open class BuildAndroidType(proj : String, env : String, branch: String) :
} }
script { script {
name = "Produce" 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({ BuildType({
name = "Build IOS" name = "Build IOS " + name_suffix
var artifact_rules : String = "*.ipa" var artifact_rules : String = "*.ipa"
artifactRules = artifact_rules artifactRules = artifact_rules
vcs { vcs {
root(GitProjectRepo) root(GitProjectRepo)
branchFilter = branch branchFilter = "+:*"
} }
params { params {
checkbox("build.env.debug", "false", label = "Debug",
description = "Build developer version.", checked = "true")
param("build.env.buildName", "%system.teamcity.buildConfName%") param("build.env.buildName", "%system.teamcity.buildConfName%")
param("build.env.workDir", "%system.teamcity.build.workingDir%") param("build.env.workDir", "%system.teamcity.build.workingDir%")
param("build.env.artifactRules", artifact_rules) 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 { steps {
script { script {
name = "Setup skeletor" name = "Setup Skeletor"
scriptContent = "./setup.sh" scriptContent = "./setup.sh"
} }
script { script {
@ -186,7 +181,7 @@ open class BuildIOSType(proj : String, env : String, branch : String) :
} }
script { script {
name = "Produce" name = "Produce"
scriptContent = "./gamectl --env=" + gamectl_environment + " build_ios" scriptContent = "./gamectl --env=" + environment
} }
} }