From e34ded0b8ceaaa6418df0ff884772dedab7e9861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Tue, 3 Oct 2017 01:16:50 +0200 Subject: [PATCH] add lang to css and js output filename to bust cache when changing localized images --- _build_common.sh | 4 ++++ _build_css.sh | 2 +- pages/_head.php | 4 ++-- webpack.config.js | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/_build_common.sh b/_build_common.sh index 833611b..0838336 100755 --- a/_build_common.sh +++ b/_build_common.sh @@ -1,3 +1,7 @@ #!/bin/bash export FRONT_END_HASH=$(git rev-parse --short HEAD) + +if [ -z "$ESP_LANG" ]; then + export ESP_LANG=en +fi diff --git a/_build_css.sh b/_build_css.sh index 8679569..3bd074e 100755 --- a/_build_css.sh +++ b/_build_css.sh @@ -10,4 +10,4 @@ else fi mkdir -p out/css -npm run sass -- --output-style ${stylearg} sass/app.scss "out/css/app.$FRONT_END_HASH.css" +npm run sass -- --output-style ${stylearg} sass/app.scss "out/css/app.$FRONT_END_HASH-$ESP_LANG.css" diff --git a/pages/_head.php b/pages/_head.php index af974b9..8ca2eb1 100644 --- a/pages/_head.php +++ b/pages/_head.php @@ -5,8 +5,8 @@ <?= $_GET['PAGE_TITLE'] ?> - - + +