Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Aug 14, 2024
1 parent e6cc6ff commit be8f855
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 51 deletions.
20 changes: 10 additions & 10 deletions bin/sync
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,25 @@ echo ">>>> Checkout branch {$BRANCH}".PHP_EOL;
$files->copy("{$workingPath}/vendor/orchestra/testbench-core/testbench.yaml", "{$workingPath}/testbench.yaml");

Illuminate\Support\Collection::make([
...$files->glob("{$workingPath}/vendor/orchestra/testbench-core/workbench/app/*"),
...$files->allFiles("{$workingPath}/vendor/orchestra/testbench-core/workbench/app/"),
])->flatten()
->filter(fn ($file) => is_file($file))
->each(function ($file) use ($files, $workingPath) {
$files->copy($file, "{$workingPath}/workbench".Illuminate\Support\Str::after($file, "{$workingPath}/vendor/orchestra/testbench-core/workbench"));
$filename = "{$workingPath}/workbench".Illuminate\Support\Str::after($file, "{$workingPath}/vendor/orchestra/testbench-core/workbench");
$files->ensureDirectoryExists(Illuminate\Support\Str::before($filename, basename($filename)));
$files->copy($file, $filename);
});

Illuminate\Support\Collection::make([
...$files->glob("{$workingPath}/vendor/orchestra/testbench-core/workbench/config/*.php"),
...$files->glob("{$workingPath}/vendor/orchestra/testbench-core/workbench/config/*/*.php"),
...$files->glob("{$workingPath}/vendor/orchestra/testbench-core/workbench/database/factories/*.php"),
...$files->glob("{$workingPath}/vendor/orchestra/testbench-core/workbench/routes/*"),
...$files->glob("{$workingPath}/vendor/orchestra/testbench-core/workbench/resources/lang/en/*"),
...$files->glob("{$workingPath}/vendor/orchestra/testbench-core/workbench/resources/views/components/*"),
...$files->glob("{$workingPath}/vendor/orchestra/testbench-core/workbench/resources/views/*"),
...$files->allFiles("{$workingPath}/vendor/orchestra/testbench-core/workbench/config/"),
...$files->allFiles("{$workingPath}/vendor/orchestra/testbench-core/workbench/routes/"),
...$files->allFiles("{$workingPath}/vendor/orchestra/testbench-core/workbench/resources/"),
])->flatten()
->filter(fn ($file) => is_file($file))
->each(function ($file) use ($files, $workingPath) {
$files->copy($file, "{$workingPath}/workbench".Illuminate\Support\Str::after($file, "{$workingPath}/vendor/orchestra/testbench-core/workbench"));
$filename = "{$workingPath}/workbench".Illuminate\Support\Str::after($file, "{$workingPath}/vendor/orchestra/testbench-core/workbench");
$files->ensureDirectoryExists(Illuminate\Support\Str::before($filename, basename($filename)));
$files->copy($file, $filename);
});

transform([
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"psr-4": {
"Orchestra\\Testbench\\Tests\\": "vendor/orchestra/testbench-core/tests/",
"Workbench\\App\\": "workbench/app/",
"Workbench\\Database\\Factories\\": "workbench/database/factories",
"Workbench\\Database\\Seeders\\": "workbench/database/seeders"
"Workbench\\Database\\Factories\\": "vendor/orchestra/testbench-core/workbench/database/factories",
"Workbench\\Database\\Seeders\\": "vendor/orchestra/testbench-core/workbench/database/seeders"
}
},
"require": {
Expand Down
39 changes: 0 additions & 39 deletions workbench/database/factories/UserFactory.php

This file was deleted.

0 comments on commit be8f855

Please sign in to comment.