Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feat: bundle builds #507

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions config/nativephp-internal.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,13 @@
* The URL to the NativePHP API.
*/
'api_url' => env('NATIVEPHP_API_URL', 'http://localhost:4000/api/'),

/**
* Configuration for the Zephpyr API.
*/
'zephpyr' => [
'host' => env('ZEPHPYR_HOST', 'https://zephpyr.com'),
'token' => env('ZEPHPYR_TOKEN'),
'key' => env('ZEPHPYR_KEY'),
],
];
8 changes: 8 additions & 0 deletions config/nativephp.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
'GITHUB_*',
'DO_SPACES_*',
'*_SECRET',
'ZEPHPYR_*',
'NATIVEPHP_UPDATER_PATH',
'NATIVEPHP_APPLE_ID',
'NATIVEPHP_APPLE_ID_PASS',
Expand All @@ -60,6 +61,8 @@
* You may use glob / wildcard patterns here.
*/
'cleanup_exclude_files' => [
'build',
'temp',
'content',
'node_modules',
'*/tests',
Expand Down Expand Up @@ -136,4 +139,9 @@
'postbuild' => [
// 'rm -rf public/build',
],

/**
* Custom PHP binary path.
*/
'binary_path' => env('NATIVEPHP_BINARY_PATH', null),
];
4 changes: 3 additions & 1 deletion src/NativeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
use Native\Laravel\Logging\LogWatcher;
use Native\Laravel\PowerMonitor as PowerMonitorImplementation;
use Native\Laravel\Windows\WindowManager as WindowManagerImplementation;
use Phar;
use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;

Expand Down Expand Up @@ -148,7 +149,8 @@ public function rewriteDatabase()
{
$databasePath = config('nativephp-internal.database_path');

if (config('app.debug')) {
// Automatically create the database in development mode but not if we are running in a Phar
if (config('app.debug') && ! Phar::running()) {
$databasePath = database_path('nativephp.sqlite');

if (! file_exists($databasePath)) {
Expand Down