feat: minversion for services
This commit is contained in:
@@ -79,6 +79,12 @@ class ServicesGenerate extends Command
|
||||
} else {
|
||||
$logo = 'svgs/unknown.svg';
|
||||
}
|
||||
$minversion = collect(preg_grep('/^# minversion:/', explode("\n", $content)))->values();
|
||||
if ($minversion->count() > 0) {
|
||||
$minversion = str($minversion[0])->after('# minversion:')->trim()->value();
|
||||
} else {
|
||||
$minversion = '0.0.0';
|
||||
}
|
||||
$env_file = collect(preg_grep('/^# env_file:/', explode("\n", $content)))->values();
|
||||
if ($env_file->count() > 0) {
|
||||
$env_file = str($env_file[0])->after('# env_file:')->trim()->value();
|
||||
@@ -103,6 +109,7 @@ class ServicesGenerate extends Command
|
||||
'compose' => $yaml,
|
||||
'tags' => $tags,
|
||||
'logo' => $logo,
|
||||
'minversion' => $minversion,
|
||||
];
|
||||
if ($env_file) {
|
||||
$env_file_content = file_get_contents(base_path("templates/compose/$env_file"));
|
||||
|
||||
@@ -15,6 +15,7 @@ class ResourceView extends Component
|
||||
public ?string $wire = null,
|
||||
public ?string $logo = null,
|
||||
public ?string $documentation = null,
|
||||
public bool $upgrade = false,
|
||||
)
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user