diff --git a/app/Console/Commands/Bundle/Render.php b/app/Console/Commands/Bundle/Render.php index fa4d1cd..059bb98 100644 --- a/app/Console/Commands/Bundle/Render.php +++ b/app/Console/Commands/Bundle/Render.php @@ -189,6 +189,18 @@ private function renderFeed(): self foreach ($result as $path => $content) { $this->output->write(sprintf('Rendering %s as feed... ', $path)); + + if ($this->targetDisk->exists($path)) { + $fileChecksum = $this->targetDisk->checksum($path); + $contentChecksum = md5($content); + + if ($fileChecksum === $contentChecksum) { + $this->info('Not changed'); + + continue; + } + } + $this->targetDisk->put($path, $content); $this->info('OK'); } @@ -230,6 +242,15 @@ private function handleBundle(Bundle $bundle, $progress) $path = Str::finish($path, '/') . 'index.html'; } + if ($this->targetDisk->exists($path)) { + $fileChecksum = $this->targetDisk->checksum($path); + $contentChecksum = md5($content); + + if ($fileChecksum !== $contentChecksum) { + continue; + } + } + $this->targetDisk->put($path, $content); } }