diff --git a/app/Bunny/Filesystem/CompareOptions.php b/app/Bunny/Filesystem/CompareOptions.php index 35b7376..7b2dc21 100644 --- a/app/Bunny/Filesystem/CompareOptions.php +++ b/app/Bunny/Filesystem/CompareOptions.php @@ -7,8 +7,8 @@ namespace App\Bunny\Filesystem; class CompareOptions { const START = 'start'; - const NO_SHA256_VERIFICATION = 'no_sha256_verification'; - const NO_SHA256_GENERATION = 'no_sha256_generation'; + const NO_LOCK_VERIFICATION = 'no_lock_verification'; + const NO_LOCK_GENERATION = 'no_lock_generation'; const LOCK_FILE = 'lock_file'; - const DRY_RUN = 'dry-run'; + const DRY_RUN = 'dry_run'; } diff --git a/app/Bunny/Filesystem/FileCompare.php b/app/Bunny/Filesystem/FileCompare.php index 84d8e96..f650be9 100644 --- a/app/Bunny/Filesystem/FileCompare.php +++ b/app/Bunny/Filesystem/FileCompare.php @@ -12,7 +12,10 @@ use Illuminate\Console\Command; class FileCompare { - private const RESERVED_FILENAMES = []; + private const RESERVED_FILENAMES = [ + '/.well-known', + '/.well-known/bunny-cli.lock', + ]; private LocalStorage $localStorage; private EdgeStorage $edgeStorage; @@ -109,7 +112,7 @@ class FileCompare } } - if (!$options[CompareOptions::NO_SHA256_GENERATION]) { + if (!$options[CompareOptions::NO_LOCK_GENERATION]) { $this->command->info('- Generating cache for current deployment...'); if (!$this->edgeStorage->getStorageCache()->save($local, $edge, $localFilesAndDirectories)) { @@ -170,7 +173,7 @@ class FileCompare { $this->edgeStorage->getStorageCache()->setFilename($options[CompareOptions::LOCK_FILE]); - if ($options[CompareOptions::NO_SHA256_VERIFICATION]) { + if ($options[CompareOptions::NO_LOCK_VERIFICATION]) { return $this->getAllFilesRecursive($expectedMax, $edge); } diff --git a/app/Commands/DeployCommand.php b/app/Commands/DeployCommand.php index f49a20d..d1f2795 100644 --- a/app/Commands/DeployCommand.php +++ b/app/Commands/DeployCommand.php @@ -19,8 +19,8 @@ class DeployCommand extends Command */ protected $signature = 'deploy {--dir=dist : Root directory to upload} - {--no-sha256-verification : Skips checksum verification from bunny-cli.lock and polls the storage api recursively instead} - {--no-sha256-generation : Skips checksum generation for bunny-cli.lock} + {--no-lock-verification : Skips checksum verification from bunny-cli.lock and polls the storage api recursively instead} + {--no-lock-generation : Skips generation of .well-known/bunny-cli.lock} {--lock-file=.well-known/bunny-cli.lock : Changes the location and filename of .well-known/bunny-cli.lock} {--dry-run : Outputs the operations but will not execute anything}'; @@ -62,8 +62,8 @@ class DeployCommand extends Command try { $fileCompare->compare($localPath, $edgePath, [ CompareOptions::START => $start, - CompareOptions::NO_SHA256_VERIFICATION => $this->option('no-sha256-verification'), - CompareOptions::NO_SHA256_GENERATION => $this->option('no-sha256-generation'), + CompareOptions::NO_LOCK_VERIFICATION => $this->option('no-lock-verification'), + CompareOptions::NO_LOCK_GENERATION => $this->option('no-lock-generation'), CompareOptions::LOCK_FILE => $this->option('lock-file'), CompareOptions::DRY_RUN => $this->option('dry-run'), ]);