Skip to content

Commit

Permalink
MAGETWO-56076: [Backport] Versioning of static files (CSS, JS, Fonts,…
Browse files Browse the repository at this point in the history
… Images, etc.) doesn't enabled by default - for 2.0
  • Loading branch information
eug123 committed Sep 19, 2016
1 parent fdf594f commit 778272a
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions app/code/Magento/Deploy/Model/DeployManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ public function deploy()
{
if ($this->idDryRun) {
$this->output->writeln('Dry run. Nothing will be recorded to the target directory.');
} else {
$version = (new \DateTime())->getTimestamp();
$this->versionStorage->save($version);
}

/** @var DeployStrategyProvider $strategyProvider */
Expand All @@ -133,7 +136,10 @@ public function deploy()
}

$this->minifyTemplates();
$this->saveDeployedVersion();

if (!$this->idDryRun) {
$this->output->writeln("New version of deployed files: {$version}");
}

return $result;
}
Expand Down Expand Up @@ -197,17 +203,4 @@ private function getProcessesAmount()
{
return isset($this->options[Options::JOBS_AMOUNT]) ? (int)$this->options[Options::JOBS_AMOUNT] : 0;
}

/**
* Save version of deployed files
* @return void
*/
private function saveDeployedVersion()
{
if (!$this->idDryRun) {
$version = (new \DateTime())->getTimestamp();
$this->output->writeln("New version of deployed files: {$version}");
$this->versionStorage->save($version);
}
}
}

0 comments on commit 778272a

Please sign in to comment.