feat: xxbb
This commit is contained in:
@@ -76,20 +76,7 @@ class ChannelProjectService
|
||||
$builderType = $this->normalizeBuilderType($builderType);
|
||||
|
||||
if ($builderType === self::BUILDER_NEW) {
|
||||
$name = strtolower(trim((string) $channelName));
|
||||
if ($name === '') {
|
||||
return;
|
||||
}
|
||||
$cmd = [
|
||||
$this->pythonBinary($builderType),
|
||||
$this->builderScript('delete_channel.py', $builderType),
|
||||
'--artifact-root',
|
||||
$this->artifactRoot(),
|
||||
'--channel-name',
|
||||
$name,
|
||||
];
|
||||
$this->runBuilder($cmd, '删除渠道资源失败', $this->builderCwd($builderType));
|
||||
|
||||
// Shared /weifile + /details must not be wiped when a DB channel row is removed.
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -198,7 +185,7 @@ class ChannelProjectService
|
||||
?string $deploymentSeed,
|
||||
?string $reportingSeed,
|
||||
): array {
|
||||
$channelName = $this->normalizeChannelName((string) $channelName);
|
||||
unset($channelName); // shared /weifile layout; no per-channel folder
|
||||
if ($channelId === '202800cfb1ad3de68e11239dcc26c30b') {
|
||||
throw new RuntimeException('channel_id 不能与 7z 密码槽相同');
|
||||
}
|
||||
@@ -213,8 +200,6 @@ class ChannelProjectService
|
||||
$this->artifactRoot(),
|
||||
'--state-root',
|
||||
$this->stateRoot(self::BUILDER_NEW),
|
||||
'--channel-name',
|
||||
$channelName,
|
||||
'--channel-c',
|
||||
$channelId,
|
||||
'--scheme',
|
||||
@@ -230,12 +215,12 @@ class ChannelProjectService
|
||||
}
|
||||
|
||||
$result = $this->runBuilder($cmd, '生成渠道资源失败', $this->builderCwd(self::BUILDER_NEW));
|
||||
$weifilePath = '/source/'.$channelName.'/index.html';
|
||||
$weifilePath = (string) ($result['weifile_path'] ?? '/weifile/weifile.html');
|
||||
|
||||
return [
|
||||
'channel_id' => $channelId,
|
||||
'builder_type' => self::BUILDER_NEW,
|
||||
'channel_name' => $channelName,
|
||||
'channel_name' => null,
|
||||
'seeds' => [
|
||||
'deployment_seed' => (string) data_get($result, 'seeds.deployment_seed', ''),
|
||||
'reporting_seed' => (string) data_get($result, 'seeds.reporting_seed', ''),
|
||||
@@ -249,7 +234,7 @@ class ChannelProjectService
|
||||
'sync_rebuilt' => (bool) ($result['sync_rebuilt'] ?? false),
|
||||
'support_path' => (string) ($result['support_path'] ?? $weifilePath),
|
||||
'weifile_path' => $weifilePath,
|
||||
'daily_path' => '',
|
||||
'daily_path' => (string) ($result['details_path'] ?? '/details/'),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user