mirror of
https://github.com/bitinflow/bunny-cli.git
synced 2026-03-13 13:45:54 +00:00
Improve command options
This commit is contained in:
@@ -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';
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user