taskman_teamcity/teamcity.inc.php

22 lines
541 B
PHP
Raw Normal View History

2022-06-06 17:14:05 +03:00
<?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));
2024-04-03 12:21:21 +03:00
$name = "\"git: $url\"";
2022-06-07 14:35:52 +03:00
set("TEAM_CITY_SETTINGS_NAME_HERE", $name);
set("TEAM_CITY_SETTINGS_URL_HERE", "\"$url\"");
2022-06-06 17:14:05 +03:00
gen_build_file(__DIR__ . "/teamcity/settings.kts.in",
"$GAME_ROOT/.teamcity/settings.kts");
}