Skip to content
This repository has been archived by the owner on May 20, 2024. It is now read-only.

Commit

Permalink
support a custom manifest file
Browse files Browse the repository at this point in the history
  • Loading branch information
Felipe Albert committed Aug 18, 2022
1 parent a14baaa commit 067c92a
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
13 changes: 13 additions & 0 deletions config/vapor-ui.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,17 @@

],

/*
|--------------------------------------------------------------------------
| Vapor Manifest file
|--------------------------------------------------------------------------
|
| This is where you will set the path of your custom manifest file.
| By default, Vapor-ui reads the vapor.yml file, but if in your application
| you need a custom file, you define the path and name of the file here
|
*/

'manifest_file' => env('VAPOR_MANIFEST_FILE', base_path('vapor.yml')),

];
2 changes: 1 addition & 1 deletion src/Support/Cloud.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static function guessQueues()
return [];
}

$vapor = (new Parser)->parse(file_get_contents(base_path('vapor.yml')));
$vapor = (new Parser)->parse(file_get_contents(config('vapor-ui.manifest_file')));

$environment = config('vapor-ui.environment');

Expand Down
12 changes: 12 additions & 0 deletions tests/Integration/Home/Title.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
use Illuminate\Support\Facades\File;

test('content', function () {
File::put(base_path('vapor.yml'), '');
Expand All @@ -10,3 +11,14 @@
"Vapor UI - $project - $environment"
);
});

test('content with custom manifest', function(){
File::put(base_path('deploy/production/vapor.yml'), '');

$project = $_ENV['VAPOR_PROJECT'];
$environment = $_ENV['VAPOR_ENVIRONMENT'];

$this->get('/vapor-ui')->assertSee(
"Vapor UI - $project - $environment"
);
});

0 comments on commit 067c92a

Please sign in to comment.