From 961c983966a2ac2de22fad6aff10007a629c1f10 Mon Sep 17 00:00:00 2001 From: Nikita Zelencov Date: Fri, 29 Jul 2022 12:06:54 +0300 Subject: [PATCH] fix teamcity find artifacts --- CHANGELOG.md | 7 +++++++ teamcity/settings.kts.in | 40 +++++++--------------------------------- 2 files changed, 14 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a491003..c27da17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## [1.3.0] - 2022-07-29 +### Added +- Add build type for china env +### Changes +- Remove "Setup Skeletor" task +- Combine env var with artifacts path with artifacts rules + ## [1.2.1] - 2022-07-19 ### Added - Environment param for set artifact path diff --git a/teamcity/settings.kts.in b/teamcity/settings.kts.in index 2b9c414..18cf21a 100644 --- a/teamcity/settings.kts.in +++ b/teamcity/settings.kts.in @@ -67,24 +67,17 @@ project { } object BuildAndroid : BuildAndroidType("", "prod/global_android") -object BuildAndroidDev : BuildAndroidType("Dev", "dev/global_android") +object BuildAndroidDev : BuildAndroidType("Dev", "dev/global_android") +object BuildAndroidCh : BuildAndroidType("Ch", "prod/china_android") object BuildIOS : BuildIOSType("", "prod/global_ios") object BuildIOSDev : BuildIOSType("Dev", "dev/global_ios") +object BuildIOSCh : BuildIOSType("Ch", "prod/china_ios") open class BuildAndroidType(name_suffix : String, environment : String) : BuildType({ name = "Build Android " + name_suffix - - var artifact_path : String = "%build.env.artifactPath%" - var artifact_rules : String = "%build.env.artifactRules%" - var artifact_rules_with_path : String = "" - - artifact_rules.split("\n").forEach { - artifact_rules_with_path += artifact_path + it + "\n" - } - - artifactRules = artifact_rules_with_path + artifactRules = "%build.env.artifactRules%" vcs { root(GitProjectRepo) @@ -94,8 +87,7 @@ open class BuildAndroidType(name_suffix : String, environment : String) : params { param("build.env.buildName", "%system.teamcity.buildConfName%") param("build.env.workDir", "%system.teamcity.build.workingDir%") - param("build.env.artifactPath", "artifacts/android/") - param("build.env.artifactRules", "*.apk\n*.aab") + param("build.env.artifactRules", "artifacts/android/*.apk\nartifacts/android/*.aab") } features { @@ -115,10 +107,6 @@ open class BuildAndroidType(name_suffix : String, environment : String) : } steps { - script { - name = "Setup Skeletor" - scriptContent = "./setup.sh" - } script { name = "Deps Update" scriptContent = "./gamectl deps_update" @@ -143,16 +131,7 @@ open class BuildAndroidType(name_suffix : String, environment : String) : open class BuildIOSType(name_suffix : String, environment : String) : BuildType({ name = "Build IOS " + name_suffix - - var artifact_path : String = "%build.env.artifactPath%" - var artifact_rules : String = "%build.env.artifactRules%" - var artifact_rules_with_path : String = "" - - artifact_rules.split("\n").forEach { - artifact_rules_with_path += artifact_path + it + "\n" - } - - artifactRules = artifact_rules_with_path + artifactRules = "%build.env.artifactRules%" vcs { root(GitProjectRepo) @@ -162,8 +141,7 @@ open class BuildIOSType(name_suffix : String, environment : String) : params { param("build.env.buildName", "%system.teamcity.buildConfName%") param("build.env.workDir", "%system.teamcity.build.workingDir%") - param("build.env.artifactPath", "artifacts/ios/") - param("build.env.artifactRules", "*.ipa") + param("build.env.artifactRules", "artifacts/ios/*.ipa") } features { @@ -183,10 +161,6 @@ open class BuildIOSType(name_suffix : String, environment : String) : } steps { - script { - name = "Setup Skeletor" - scriptContent = "./setup.sh" - } script { name = "Deps Update" scriptContent = "./gamectl deps_update"