1 | <?php |
||
15 | class PublishScp extends Command |
||
16 | { |
||
17 | use ChecksEnv, RunsSSHCommands; |
||
18 | |||
19 | /** |
||
20 | * Server name |
||
21 | * |
||
22 | * @var String |
||
23 | */ |
||
24 | protected $server; |
||
25 | |||
26 | /** |
||
27 | * Domain |
||
28 | * |
||
29 | * @var String |
||
30 | */ |
||
31 | protected $domain; |
||
32 | |||
33 | /** |
||
34 | * The name and signature of the console command. |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $signature = 'publish:scp {file} {--server=} {--domain=}'; |
||
39 | |||
40 | /** |
||
41 | * The console command description. |
||
42 | * |
||
43 | * @var string |
||
44 | */ |
||
45 | protected $description = 'Copy file or folder to production via scp'; |
||
46 | |||
47 | /** |
||
48 | * Guzzle http client. |
||
49 | * |
||
50 | * @var Client |
||
51 | */ |
||
52 | protected $http; |
||
53 | |||
54 | /** |
||
55 | * Create a new command instance. |
||
56 | * |
||
57 | */ |
||
58 | public function __construct(Client $http) |
||
63 | |||
64 | /** |
||
65 | * Execute the console command. |
||
66 | * |
||
67 | */ |
||
68 | public function handle() |
||
74 | |||
75 | /** |
||
76 | * Abort command execution? |
||
77 | */ |
||
78 | protected function abortCommandExecution() |
||
84 | } |
||
85 |