Compare commits

..

No commits in common. "master" and "v1.2.1" have entirely different histories.

3 changed files with 37 additions and 28 deletions

View File

@ -5,23 +5,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/). and this project adheres to [Semantic Versioning](http://semver.org/).
## [1.3.2] - 2023-01-12
### Fixed requirements
- Key words for required agent names
## [1.3.1] - 2023-01-10
### Changed
- Move one of agent from ios to android
## [1.3.0] - 2022-07-29
### Fixed
- Search "*.aab" artifacts
### Added
- Build type for china env
### Changes
- Removed "Setup Skeletor" step
- Environment var "artifactsPath" was combined with "artifactsRules"
## [1.2.1] - 2022-07-19 ## [1.2.1] - 2022-07-19
### Added ### Added
- Environment param for set artifact path - Environment param for set artifact path
@ -36,7 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [1.1.0] - 2022-06-07 ## [1.1.0] - 2022-06-07
### Fixed ### Fixed
- Using of deprecated taskman functions - Using of deprecated taskman functions
- Replaced "try_deps_update" with "deps_update" - Replaced 'try_deps_update' with 'deps_update'
## [1.0.1] - 2022-06-07 ## [1.0.1] - 2022-06-07
### Added ### Added

View File

@ -13,7 +13,7 @@ function setup_teamcity_settings($args = array())
$cmd = "git config --get remote.origin.url"; $cmd = "git config --get remote.origin.url";
$url = str_replace("\n", "", shell_exec($cmd)); $url = str_replace("\n", "", shell_exec($cmd));
$name = "\"git: $url\""; $name = "\"git: ${url}\"";
set("TEAM_CITY_SETTINGS_NAME_HERE", $name); set("TEAM_CITY_SETTINGS_NAME_HERE", $name);
set("TEAM_CITY_SETTINGS_URL_HERE", "\"$url\""); set("TEAM_CITY_SETTINGS_URL_HERE", "\"$url\"");

View File

@ -68,16 +68,23 @@ project {
object BuildAndroid : BuildAndroidType("", "prod/global_android") 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 BuildIOS : BuildIOSType("", "prod/global_ios")
object BuildIOSDev : BuildIOSType("Dev", "dev/global_ios") object BuildIOSDev : BuildIOSType("Dev", "dev/global_ios")
object BuildIOSCh : BuildIOSType("Ch", "prod/china_ios")
open class BuildAndroidType(name_suffix : String, environment : String) : open class BuildAndroidType(name_suffix : String, environment : String) :
BuildType({ BuildType({
name = "Build Android " + name_suffix name = "Build Android " + name_suffix
artifactRules = "%build.env.artifactRules%"
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
vcs { vcs {
root(GitProjectRepo) root(GitProjectRepo)
@ -87,7 +94,8 @@ open class BuildAndroidType(name_suffix : String, environment : String) :
params { params {
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", "artifacts/android/*.apk\nartifacts/android/*.aab") param("build.env.artifactPath", "artifacts/android/")
param("build.env.artifactRules", "*.apk\n*.aab")
} }
features { features {
@ -107,6 +115,10 @@ open class BuildAndroidType(name_suffix : String, environment : String) :
} }
steps { steps {
script {
name = "Setup Skeletor"
scriptContent = "./setup.sh"
}
script { script {
name = "Deps Update" name = "Deps Update"
scriptContent = "./gamectl deps_update" scriptContent = "./gamectl deps_update"
@ -122,7 +134,7 @@ open class BuildAndroidType(name_suffix : String, environment : String) :
} }
requirements { requirements {
matches("teamcity.agent.name", "(Default Agent|Default Agent 2)") equals("teamcity.agent.name", "Default Agent")
} }
} }
) )
@ -131,7 +143,16 @@ open class BuildAndroidType(name_suffix : String, environment : String) :
open class BuildIOSType(name_suffix : String, environment : String) : open class BuildIOSType(name_suffix : String, environment : String) :
BuildType({ BuildType({
name = "Build IOS " + name_suffix name = "Build IOS " + name_suffix
artifactRules = "%build.env.artifactRules%"
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
vcs { vcs {
root(GitProjectRepo) root(GitProjectRepo)
@ -141,7 +162,8 @@ open class BuildIOSType(name_suffix : String, environment : String) :
params { params {
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", "artifacts/ios/*.ipa") param("build.env.artifactPath", "artifacts/ios/")
param("build.env.artifactRules", "*.ipa")
} }
features { features {
@ -161,6 +183,10 @@ open class BuildIOSType(name_suffix : String, environment : String) :
} }
steps { steps {
script {
name = "Setup Skeletor"
scriptContent = "./setup.sh"
}
script { script {
name = "Deps Update" name = "Deps Update"
scriptContent = "./gamectl deps_update" scriptContent = "./gamectl deps_update"
@ -176,7 +202,7 @@ open class BuildIOSType(name_suffix : String, environment : String) :
} }
requirements { requirements {
equals("teamcity.agent.name", "Default Agent 3") matches("teamcity.agent.name", "(Default Agent 2|Default Agent 3)")
} }
}) })
{} {}