From 37e90f1c18dbb552af1ef5f568bb2886f1800914 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Fri, 12 Feb 2021 17:06:26 +0100 Subject: [PATCH] Add timestamp to builds --- builder | 3 +++ system/config/beta_communiquons.config.php | 2 +- system/config/communiquons.config.php | 2 +- system/config/comunic_io.config.php | 2 +- system/config/docker.config.php | 2 +- system/config/offline.config.php | 4 ++-- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/builder b/builder index de2fba3d..de51415f 100755 --- a/builder +++ b/builder @@ -14,6 +14,9 @@ define("OUTPUT_DIRECTORY", __DIR__."/output/"); //Temporary file define("TEMP_FILE", __DIR__."/output/temp"); +// Build time +define("BUILD_TIME", time()); + //Defines some utilities /** diff --git a/system/config/beta_communiquons.config.php b/system/config/beta_communiquons.config.php index 1059ec2a..9512d82e 100644 --- a/system/config/beta_communiquons.config.php +++ b/system/config/beta_communiquons.config.php @@ -30,7 +30,7 @@ class Beta_communiquons extends Offline { /** * Path to assets (URL) */ - const ASSETS_URL = "https://beta.communiquons.org/assets/"; + const ASSETS_URL = "https://beta.communiquons.org/assets/".BUILD_TIME."/"; /** * Site requires https connection diff --git a/system/config/communiquons.config.php b/system/config/communiquons.config.php index d2fdb135..e482bb50 100644 --- a/system/config/communiquons.config.php +++ b/system/config/communiquons.config.php @@ -35,7 +35,7 @@ class Communiquons extends Offline { /** * Path to assets (URL) */ - const ASSETS_URL = "https://communiquons.org/assets/"; + const ASSETS_URL = "https://communiquons.org/assets/".BUILD_TIME."/"; /** * Site requires https connection diff --git a/system/config/comunic_io.config.php b/system/config/comunic_io.config.php index 8e9065df..6e252ebd 100644 --- a/system/config/comunic_io.config.php +++ b/system/config/comunic_io.config.php @@ -35,7 +35,7 @@ class Comunic_io extends Offline { /** * Path to assets (URL) */ - const ASSETS_URL = "https://comunic.io/assets/"; + const ASSETS_URL = "https://comunic.io/assets/".BUILD_TIME."/"; /** * Site requires https connection diff --git a/system/config/docker.config.php b/system/config/docker.config.php index 6514188d..d5ec6724 100644 --- a/system/config/docker.config.php +++ b/system/config/docker.config.php @@ -35,5 +35,5 @@ class Docker extends Offline { /** * Path to assets (URL) */ - const ASSETS_URL = self::CONTAINER_URL."assets/"; + const ASSETS_URL = self::CONTAINER_URL."assets/".BUILD_TIME."/"; } \ No newline at end of file diff --git a/system/config/offline.config.php b/system/config/offline.config.php index a41ea7dd..04cea701 100644 --- a/system/config/offline.config.php +++ b/system/config/offline.config.php @@ -32,12 +32,12 @@ class Offline { /** * Path to assets (relative to the build folder) */ - const PATH_ASSETS = "assets/"; + const PATH_ASSETS = "assets/".BUILD_TIME."/"; /** * Path to assets (URL) */ - const ASSETS_URL = "https://devweb.local/comunic/v2/output/assets/"; + const ASSETS_URL = "https://devweb.local/comunic/v2/output/assets/".BUILD_TIME."/"; /** * Third party CSS files