Skip to content

Commit 3ed2228

Browse files
authored
Improve Publish command
1 parent 2fdd6ae commit 3ed2228

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Commands/PublishCommand.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,16 @@ public function handle(): void
3030
echo $output;
3131
});
3232

33+
$buildCommand = 'npm run build';
34+
if ($this->argument('os')) {
35+
$buildCommand .= ':'.$this->argument('os');
36+
}
37+
3338
Process::path(__DIR__.'/../../resources/js/')
3439
->env($this->getEnvironmentVariables())
3540
->forever()
3641
->tty(PHP_OS_FAMILY != 'Windows' && ! $this->option('no-interaction'))
37-
->run('npm run publish:mac-arm', function (string $type, string $output) {
42+
->run($buildCommand, function (string $type, string $output) {
3843
echo $output;
3944
});
4045
}
@@ -45,6 +50,7 @@ protected function getEnvironmentVariables(): array
4550
[
4651
'APP_PATH' => base_path(),
4752
'NATIVEPHP_BUILDING' => true,
53+
'NATIVEPHP_PHP_BINARY_VERSION' => PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION,
4854
'NATIVEPHP_PHP_BINARY_PATH' => base_path($this->phpBinaryPath()),
4955
'NATIVEPHP_CERTIFICATE_FILE_PATH' => base_path($this->binaryPackageDirectory().'cacert.pem'),
5056
'NATIVEPHP_APP_NAME' => config('app.name'),

0 commit comments

Comments
 (0)