#feature: some update

This commit is contained in:
2026-08-12 18:00:09 +08:00
parent ba916f5ce1
commit 103340536b
39 changed files with 2916 additions and 227 deletions
+35 -3
View File
@@ -331,6 +331,16 @@ class JiraService
['name' => 'portal-ticket-fe-web', 'location' => '法兰克福&中国'],
],
],
'mono' => [
'label' => 'mono',
'system' => 'SP',
'current_version' => $this->resolveTestMailCurrentVersion('portal-mono-be', '1.11.0.0'),
'database_enabled' => false,
'containers' => [
['name' => 'portal-mono-be-aplct', 'location' => '中国'],
['name' => 'portal-mono-be-web', 'location' => '中国'],
],
],
];
foreach ($containerGroups as &$group) {
@@ -368,10 +378,15 @@ class JiraService
}
private function nextTestMailVersion(string $version): string
{
return $this->nextMinorVersion($version) ?? $version;
}
private function nextMinorVersion(string $version): ?string
{
$parts = explode('.', trim($version));
if (count($parts) < 2 || ! ctype_digit($parts[1])) {
return $version;
return null;
}
$parts[1] = (string) ((int) $parts[1] + 1);
@@ -379,6 +394,20 @@ class JiraService
return implode('.', $parts);
}
private function buildFallbackReleaseVersion(string $currentVersion): ?array
{
$version = $this->nextMinorVersion($currentVersion);
if ($version === null) {
return null;
}
return [
'version' => $version,
'description' => null,
'release_date' => null,
];
}
public function buildTestMailDatabases(array $selectedGroups, array $versions): array
{
$defaults = $this->getTestMailTemplateDefaults();
@@ -389,6 +418,9 @@ class JiraService
continue;
}
$group = $defaults['container_groups'][$groupKey];
if (($group['database_enabled'] ?? true) === false) {
continue;
}
$version = trim((string) ($versions[$groupKey] ?? $group['default_version'] ?? ''));
$branch = $version !== '' ? 'release/'.$version : '';
$exists = $branch !== '' && $this->gitBranchExists($group['db_project'], $branch);
@@ -1498,7 +1530,7 @@ class JiraService
->first();
if (! $candidate) {
return null;
return $this->buildFallbackReleaseVersion($currentVersion);
}
return [
@@ -1517,7 +1549,7 @@ class JiraService
->first();
if (! $candidate) {
return null;
return $this->buildFallbackReleaseVersion($currentVersion);
}
return [