Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Details | Vergleich mit vorheriger | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Laravel\Sail\Console;
4
 
5
use Illuminate\Console\Command;
6
 
7
class PublishCommand extends Command
8
{
9
    /**
10
     * The name and signature of the console command.
11
     *
12
     * @var string
13
     */
14
    protected $signature = 'sail:publish';
15
 
16
    /**
17
     * The console command description.
18
     *
19
     * @var string
20
     */
21
    protected $description = 'Publish the Laravel Sail Docker files';
22
 
23
    /**
24
     * Execute the console command.
25
     *
26
     * @return void
27
     */
28
    public function handle()
29
    {
30
        $this->call('vendor:publish', ['--tag' => 'sail-docker']);
31
 
32
        file_put_contents(
33
            $this->laravel->basePath('docker-compose.yml'),
34
            str_replace(
35
                [
36
                    './vendor/laravel/sail/runtimes/8.2',
37
                    './vendor/laravel/sail/runtimes/8.1',
38
                    './vendor/laravel/sail/runtimes/8.0',
39
                ],
40
                [
41
                    './docker/8.2',
42
                    './docker/8.1',
43
                    './docker/8.0',
44
                ],
45
                file_get_contents($this->laravel->basePath('docker-compose.yml'))
46
            )
47
        );
48
    }
49
}