8000 Add default keys to remove · LunashaGit/laravel-nativephp@8d405f4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8d405f4

Browse files
committed
Add default keys to remove
1 parent d3fa38d commit 8d405f4

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

config/nativephp.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,17 @@
4141
/**
4242
* A list of environment keys that should be removed from the
4343
* .env file when the application is bundled for production.
44+
* You may use wildcards to match multiple keys.
4445
*/
45-
'cleanup_env_keys' => [],
46+
'cleanup_env_keys' => [
47+
'AWS_*',
48+
'DO_SPACES_*',
49+
'*_SECRET',
50+
'NATIVEPHP_UPDATER_PATH',
51+
'NATIVEPHP_APPLE_ID',
52+
'NATIVEPHP_APPLE_ID_PASS',
53+
'NATIVEPHP_APPLE_TEAM_ID',
54+
],
4655

4756
/**
4857
* The NativePHP updater configuration.

src/Commands/MinifyApplicationCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ protected function cleanUpEnvFile(string $appPath): void
5555
->filter(function (string $line) use ($cleanUpKeys) {
5656
$key = Str::before($line, '=');
5757

58-
return ! in_array($key, $cleanUpKeys);
58+
return ! Str::is($cleanUpKeys, $key);
5959
})
6060
->join("\n");
6161

src/NativeServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public function configurePackage(Package $package): void
2020
->name('nativephp')
2121
->hasCommands([
2222
MigrateCommand::class,
23+
MinifyApplicationCommand::class,
2324
])
2425
->hasConfigFile()
2526
->hasRoute('api')
@@ -37,7 +38,6 @@ public function packageRegistered()
3738
if (config('nativephp-internal.running')) {
3839
Artisan::starting(function ($artisan) {
3940
$artisan->resolveCommands([
40-
MinifyApplicationCommand::class,
4141
LoadStartupConfigurationCommand::class,
4242
LoadPHPConfigurationCommand::class,
4343
]);

0 commit comments

Comments
 (0)
0