feat: 18
This commit is contained in:
@@ -45,7 +45,11 @@ class ChannelProjectService
|
||||
$builderType = $this->normalizeBuilderType($builderType);
|
||||
|
||||
if ($builderType === self::BUILDER_NEW) {
|
||||
return $this->generateNew($channelId, $supportTemplate);
|
||||
return $this->generateNew(
|
||||
$channelId,
|
||||
$supportTemplate,
|
||||
dsDomain: (string) config('coruna.xxbb.ds_domain', ''),
|
||||
);
|
||||
}
|
||||
|
||||
[$deploymentSeed, $reportingSeed] = $this->normalizeOptionalSeeds(
|
||||
@@ -210,6 +214,7 @@ class ChannelProjectService
|
||||
?array $channelIds = null,
|
||||
string $supportTemplate = self::DEFAULT_SUPPORT_TEMPLATE,
|
||||
bool $rebuildShared = true,
|
||||
string $dsDomain = '',
|
||||
): array {
|
||||
$ids = $this->resolveNewChannelIds($channelIds);
|
||||
if ($ids === []) {
|
||||
@@ -223,7 +228,7 @@ class ChannelProjectService
|
||||
|
||||
$channels = [];
|
||||
foreach ($ids as $id) {
|
||||
$channels[] = $this->generateNew($id, $supportTemplate, rebuildShared: false);
|
||||
$channels[] = $this->generateNew($id, $supportTemplate, rebuildShared: false, dsDomain: $dsDomain);
|
||||
}
|
||||
|
||||
return [
|
||||
@@ -265,6 +270,7 @@ class ChannelProjectService
|
||||
string $channelId,
|
||||
string $supportTemplate = self::DEFAULT_SUPPORT_TEMPLATE,
|
||||
bool $rebuildShared = true,
|
||||
string $dsDomain = '',
|
||||
): array {
|
||||
$channelId = Channel::normalizeNewChannelId($channelId);
|
||||
if ($channelId === null) {
|
||||
@@ -298,6 +304,10 @@ class ChannelProjectService
|
||||
'--landing-template',
|
||||
$supportTemplate,
|
||||
];
|
||||
if ($dsDomain !== '') {
|
||||
$cmd[] = '--ds-domain';
|
||||
$cmd[] = $dsDomain;
|
||||
}
|
||||
|
||||
$result = $this->runBuilder($cmd, '打包渠道代码失败', $this->builderCwd(self::BUILDER_NEW));
|
||||
$seeds = $this->loadNewLabSeeds();
|
||||
@@ -324,6 +334,7 @@ class ChannelProjectService
|
||||
'channel_dir' => '/channel/'.$channelId,
|
||||
'show_alias' => (string) ($result['show_alias'] ?? '/c/'.$channelId.'/show.htm'),
|
||||
'support_template' => (string) ($result['landing_template'] ?? $supportTemplate),
|
||||
'ds_domain' => $dsDomain,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user