22 lines
541 B
PHP
22 lines
541 B
PHP
<?php
|
|
namespace taskman;
|
|
use Exception;
|
|
|
|
task('setup_teamcity_settings', function($args = [])
|
|
{
|
|
setup_teamcity_settings($args);
|
|
});
|
|
|
|
function setup_teamcity_settings($args = array())
|
|
{
|
|
global $GAME_ROOT;
|
|
|
|
$cmd = "git config --get remote.origin.url";
|
|
$url = str_replace("\n", "", shell_exec($cmd));
|
|
$name = "\"git: $url\"";
|
|
set("TEAM_CITY_SETTINGS_NAME_HERE", $name);
|
|
set("TEAM_CITY_SETTINGS_URL_HERE", "\"$url\"");
|
|
|
|
gen_build_file(__DIR__ . "/teamcity/settings.kts.in",
|
|
"$GAME_ROOT/.teamcity/settings.kts");
|
|
}
|