This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git

commit cd025d2f477b7201f1c84cd5f73a98c2684f61e5
Author: Daniel Gruno <[email protected]>
AuthorDate: Sun Nov 21 20:51:00 2021 +0100

    Set build script to also adjust cache triggers for .html files if set
    
    This allows us to quickly refresh css and js by specifying the revision
    as a query string.
---
 webui/js/source/build.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/webui/js/source/build.sh b/webui/js/source/build.sh
index 3ead4a0..31914e1 100755
--- a/webui/js/source/build.sh
+++ b/webui/js/source/build.sh
@@ -31,5 +31,11 @@ for f in `ls *.js`; do
     printf "\n\n/******************************************\n Fetched from 
source/${f}\n******************************************/\n\n" >> ../ponymail.js
     perl -0pe 's/\/\*.*?\*\/[\r\n]*//sm' ${f} >> ../ponymail.js
 done
+
+# Adjust JS caches in .html
+for f in `ls ../../*.html`; do
+    echo ${f}
+    perl -0pe 's/\?revision=[a-f0-9]+/?revision='${REVISION}'/sm' ${f} > 
${f}.tmp && mv ${f}.tmp ${f}
+done
 echo "Done!"
 

Reply via email to