Skip to content

Commit 84443aa

Browse files
authored
add 'all' option to publish command (#185)
* add 'all' option * Fix styling --------- Co-authored-by: gwleuverink <[email protected]>
1 parent f60f497 commit 84443aa

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Commands/PublishCommand.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,22 @@ class PublishCommand extends Command
1313
use OsAndArch;
1414

1515
protected $signature = 'native:publish
16-
{os? : The operating system to build for (linux, mac, win)}
16+
{os? : The operating system to build for (all, linux, mac, win)}
1717
{arch? : The Processor Architecture to build for (x64, x86, arm64)}';
1818

19-
protected array $availableOs = ['win', 'linux', 'mac'];
19+
protected array $availableOs = ['win', 'linux', 'mac', 'all'];
2020

2121
public function handle(): void
2222
{
2323
$this->info('Building and publishing NativePHP app…');
2424

2525
$os = $this->selectOs($this->argument('os'));
2626

27-
$arch = $this->selectArchitectureForOs($os, $this->argument('arch'));
27+
$arch = null;
28+
29+
if ($os != 'all') {
30+
$arch = $this->selectArchitectureForOs($os, $this->argument('arch'));
31+
}
2832

2933
Artisan::call('native:build', ['os' => $os, 'arch' => $arch, '--publish' => true], $this->output);
3034
}

0 commit comments

Comments
 (0)