Skip to content

Commit 5df01d4

Browse files
committed
MAGETWO-56915: Versioning of static files (CSS, JS, Fonts, Images, etc.) doesn't enabled by default - for mainline
1 parent 91a4218 commit 5df01d4

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

app/code/Magento/Deploy/Model/DeployManager.php

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ public function deploy()
108108
{
109109
if ($this->idDryRun) {
110110
$this->output->writeln('Dry run. Nothing will be recorded to the target directory.');
111+
} else {
112+
$version = (new \DateTime())->getTimestamp();
113+
$this->versionStorage->save($version);
111114
}
112115

113116
/** @var DeployStrategyProvider $strategyProvider */
@@ -133,7 +136,9 @@ public function deploy()
133136
}
134137

135138
$this->minifyTemplates();
136-
$this->saveDeployedVersion();
139+
if (!$this->idDryRun) {
140+
$this->output->writeln("New version of deployed files: {$version}");
141+
}
137142

138143
return $result;
139144
}
@@ -197,17 +202,4 @@ private function getProcessesAmount()
197202
{
198203
return isset($this->options[Options::JOBS_AMOUNT]) ? (int)$this->options[Options::JOBS_AMOUNT] : 0;
199204
}
200-
201-
/**
202-
* Save version of deployed files
203-
* @return void
204-
*/
205-
private function saveDeployedVersion()
206-
{
207-
if (!$this->idDryRun) {
208-
$version = (new \DateTime())->getTimestamp();
209-
$this->output->writeln("New version of deployed files: {$version}");
210-
$this->versionStorage->save($version);
211-
}
212-
}
213205
}

0 commit comments

Comments
 (0)