fix: revert a few lines
This commit is contained in:
@@ -3267,7 +3267,19 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
|
|||||||
} else {
|
} else {
|
||||||
$value = $fqdn;
|
$value = $fqdn;
|
||||||
}
|
}
|
||||||
$value = str($fqdn)->replace('http://', '')->replace('https://', '');
|
if (! $isDatabase) {
|
||||||
|
if ($isApplication && is_null($resource->fqdn)) {
|
||||||
|
data_forget($resource, 'environment_variables');
|
||||||
|
data_forget($resource, 'environment_variables_preview');
|
||||||
|
$resource->fqdn = $value;
|
||||||
|
$resource->save();
|
||||||
|
} elseif ($isService && is_null($savedService->fqdn)) {
|
||||||
|
if ($key->startsWith('SERVICE_FQDN_')) {
|
||||||
|
$savedService->fqdn = $value;
|
||||||
|
$savedService->save();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} elseif ($keyCommand->value() === 'URL' || $valueCommand->value() === 'URL') {
|
} elseif ($keyCommand->value() === 'URL' || $valueCommand->value() === 'URL') {
|
||||||
if ($isApplication) {
|
if ($isApplication) {
|
||||||
@@ -3281,19 +3293,7 @@ function newParser(Application|Service $resource, int $pull_request_id = 0, ?int
|
|||||||
} else {
|
} else {
|
||||||
$value = $fqdn;
|
$value = $fqdn;
|
||||||
}
|
}
|
||||||
if (! $isDatabase) {
|
$value = str($fqdn)->replace('http://', '')->replace('https://', '');
|
||||||
if ($isApplication && is_null($resource->fqdn)) {
|
|
||||||
data_forget($resource, 'environment_variables');
|
|
||||||
data_forget($resource, 'environment_variables_preview');
|
|
||||||
$resource->fqdn = $value;
|
|
||||||
$resource->save();
|
|
||||||
} elseif ($isService && is_null($savedService->fqdn)) {
|
|
||||||
if ($key->startsWith('SERVICE_URL_')) {
|
|
||||||
$savedService->fqdn = $value;
|
|
||||||
$savedService->save();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$generatedValue = generateEnvValue($valueCommand, $resource);
|
$generatedValue = generateEnvValue($valueCommand, $resource);
|
||||||
if ($generatedValue) {
|
if ($generatedValue) {
|
||||||
|
|||||||
Reference in New Issue
Block a user