From: Dan Brown Date: Thu, 9 Mar 2023 15:41:18 +0000 (+0000) Subject: Restructured repo to work as it's own project X-Git-Url: http://source.bookstackapp.com/system-cli/commitdiff_plain/2757341bb5ad7ccdebf6296480adeb1efc0f8137 Restructured repo to work as it's own project --- diff --git a/.gitignore b/.gitignore index da0d475..c2a0e34 100644 --- a/.gitignore +++ b/.gitignore @@ -1,29 +1,14 @@ /vendor -/node_modules -Homestead.yaml -.env .idea -npm-debug.log -yarn-error.log -/public/dist -/public/plugins -/public/css -/public/js -/public/bower -/public/build/ -/public/favicon.ico -/storage/images -_ide_helper.php -/storage/debugbar +*.zip .phpstorm.meta.php -yarn.lock /bin nbproject .buildpath .project .settings/ -webpack-stats.json .phpunit.result.cache .DS_Store -phpstan.neon -/composer \ No newline at end of file +/composer +*.phar +/bookstack-system-cli \ No newline at end of file diff --git a/scripts/compile.php b/compile.php similarity index 87% rename from scripts/compile.php rename to compile.php index ff7d16c..16f4f00 100644 --- a/scripts/compile.php +++ b/compile.php @@ -25,12 +25,12 @@ try { $phar->startBuffering(); // Create the default stub from main.php entrypoint - $defaultStub = $phar->createDefaultStub('run'); + $defaultStub = $phar->createDefaultStub('run.php'); // Add the rest of the apps files - $phar->addFile(__DIR__ . '/run', 'run'); + $phar->addFile(__DIR__ . '/run.php', 'run.php'); + $phar->buildFromDirectory(__DIR__, '/src(.*)/'); $phar->buildFromDirectory(__DIR__, '/vendor(.*)/'); - $phar->buildFromDirectory(__DIR__, '/Commands(.*)/'); // Customize the stub to add the shebang $stub = "#!/usr/bin/env php \n" . $defaultStub; diff --git a/scripts/composer.json b/composer.json similarity index 81% rename from scripts/composer.json rename to composer.json index 50c971f..92504f1 100644 --- a/scripts/composer.json +++ b/composer.json @@ -6,8 +6,7 @@ }, "autoload": { "psr-4": { - "Cli\\Commands\\": "Commands/", - "Cli\\Services\\": "Services/" + "Cli\\": "src/" } }, "config": { diff --git a/scripts/composer.lock b/composer.lock similarity index 100% rename from scripts/composer.lock rename to composer.lock diff --git a/scripts/run b/run.php similarity index 100% rename from scripts/run rename to run.php diff --git a/scripts/.gitignore b/src/.gitignore similarity index 100% rename from scripts/.gitignore rename to src/.gitignore diff --git a/scripts/Commands/BackupCommand.php b/src/Commands/BackupCommand.php similarity index 100% rename from scripts/Commands/BackupCommand.php rename to src/Commands/BackupCommand.php diff --git a/scripts/Commands/CommandError.php b/src/Commands/CommandError.php similarity index 100% rename from scripts/Commands/CommandError.php rename to src/Commands/CommandError.php diff --git a/scripts/Commands/InitCommand.php b/src/Commands/InitCommand.php similarity index 100% rename from scripts/Commands/InitCommand.php rename to src/Commands/InitCommand.php diff --git a/scripts/Commands/RestoreCommand.php b/src/Commands/RestoreCommand.php similarity index 100% rename from scripts/Commands/RestoreCommand.php rename to src/Commands/RestoreCommand.php diff --git a/scripts/Commands/UpdateCommand.php b/src/Commands/UpdateCommand.php similarity index 100% rename from scripts/Commands/UpdateCommand.php rename to src/Commands/UpdateCommand.php diff --git a/scripts/Services/AppLocator.php b/src/Services/AppLocator.php similarity index 100% rename from scripts/Services/AppLocator.php rename to src/Services/AppLocator.php diff --git a/scripts/Services/ArtisanRunner.php b/src/Services/ArtisanRunner.php similarity index 100% rename from scripts/Services/ArtisanRunner.php rename to src/Services/ArtisanRunner.php diff --git a/scripts/Services/BackupZip.php b/src/Services/BackupZip.php similarity index 100% rename from scripts/Services/BackupZip.php rename to src/Services/BackupZip.php diff --git a/scripts/Services/ComposerLocator.php b/src/Services/ComposerLocator.php similarity index 100% rename from scripts/Services/ComposerLocator.php rename to src/Services/ComposerLocator.php diff --git a/scripts/Services/EnvironmentLoader.php b/src/Services/EnvironmentLoader.php similarity index 100% rename from scripts/Services/EnvironmentLoader.php rename to src/Services/EnvironmentLoader.php diff --git a/scripts/Services/InteractiveConsole.php b/src/Services/InteractiveConsole.php similarity index 100% rename from scripts/Services/InteractiveConsole.php rename to src/Services/InteractiveConsole.php diff --git a/scripts/Services/MySqlRunner.php b/src/Services/MySqlRunner.php similarity index 100% rename from scripts/Services/MySqlRunner.php rename to src/Services/MySqlRunner.php diff --git a/scripts/Services/ProgramRunner.php b/src/Services/ProgramRunner.php similarity index 100% rename from scripts/Services/ProgramRunner.php rename to src/Services/ProgramRunner.php diff --git a/scripts/Services/RequirementsValidator.php b/src/Services/RequirementsValidator.php similarity index 100% rename from scripts/Services/RequirementsValidator.php rename to src/Services/RequirementsValidator.php