From 5df01d486904c700c04a5b79c034cd8b903d5da5 Mon Sep 17 00:00:00 2001
From: Ievgen Kolesov <ikolesov@magento.com>
Date: Fri, 16 Sep 2016 15:59:41 +0300
Subject: [PATCH] MAGETWO-56915: Versioning of static files (CSS, JS, Fonts,
 Images, etc.) doesn't enabled by default - for mainline

---
 .../Magento/Deploy/Model/DeployManager.php    | 20 ++++++-------------
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/app/code/Magento/Deploy/Model/DeployManager.php b/app/code/Magento/Deploy/Model/DeployManager.php
index c54aa38f5a3..93186f05f9d 100644
--- a/app/code/Magento/Deploy/Model/DeployManager.php
+++ b/app/code/Magento/Deploy/Model/DeployManager.php
@@ -108,6 +108,9 @@ class DeployManager
     {
         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 */
@@ -133,7 +136,9 @@ class DeployManager
         }
 
         $this->minifyTemplates();
-        $this->saveDeployedVersion();
+        if (!$this->idDryRun) {
+            $this->output->writeln("New version of deployed files: {$version}");
+        }
 
         return $result;
     }
@@ -197,17 +202,4 @@ class DeployManager
     {
         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);
-        }
-    }
 }
-- 
GitLab