@@ -168,14 +168,18 @@ private function addFilesToZip(ZipArchive $zip): void
168
168
'node_modules ' , // We add this later
169
169
'dist ' , // Compiled nativephp assets
170
170
'build ' , // Compiled box assets
171
+ 'temp ' , // Temp files
171
172
'tests ' , // Tests
172
173
...config ('nativephp.cleanup_exclude_files ' , []), // User defined
173
174
]);
174
175
175
176
$ this ->finderToZip ($ app , $ zip );
176
177
178
+ // Add .env file
179
+ $ zip ->addFile (base_path ('.env ' ), '.env ' );
180
+
177
181
$ vendor = (new Finder )->files ()
178
- // ->followLinks()
182
+ // ->followLinks() // This is causing issues with excluded files
179
183
->exclude (array_filter ([
180
184
'nativephp/php-bin ' ,
181
185
'nativephp/electron/resources/js ' ,
@@ -233,6 +237,8 @@ private function checkAuthenticated()
233
237
234
238
private function fetchLatestBundle (): bool
235
239
{
240
+ $ this ->line ('Fetching latest bundle… ' );
241
+
236
242
$ response = Http::acceptJson ()
237
243
->withToken (config ('nativephp-internal.zephpyr.token ' ))
238
244
->get ($ this ->baseUrl ().'api/v1/project/ ' .$ this ->key .'/build/download ' );
@@ -241,6 +247,7 @@ private function fetchLatestBundle(): bool
241
247
return false ;
242
248
}
243
249
250
+ @mkdir (base_path ('build ' ), recursive: true );
244
251
file_put_contents (base_path ('build/__nativephp_app_bundle ' ), $ response ->body ());
245
252
246
253
return true ;
0 commit comments