Skip to content

Commit

Permalink
chore: try to control caching by adding meta cache tags
Browse files Browse the repository at this point in the history
  • Loading branch information
kilianc committed May 17, 2024
1 parent 0cd5af9 commit b948754
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ cd "${cover_dir}"
hash=$(cat index.css index.js | md5sum | awk '{print $1}')

for file in "revisions/${REVISION}.html" "revisions/${REVISION}-inc.html"; do
ex -sc '%s/<\/style>/<\/style><script src="..\/index.js?'"${hash}"'"><\/script>/' -c 'x' "${file}"
ex -sc '%s/<\/style>/<\/style>\r\t\t<script src="..\/index.js?'"${hash}"'"><\/script>/' -c 'x' "${file}"
ex -sc '%s/<title>/<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" \/>\r\t\t<title>/' -c 'x' "${file}"
ex -sc '%s/<title>/<meta http-equiv="Pragma" content="no-cache" \/>\r\t\t<title>/' -c 'x' "${file}"
ex -sc '%s/<title>/<meta http-equiv="Expires" content="0" \/>\r\t\t<title>/' -c 'x' "${file}"
done


# if we are on the main branch, copy files to main.*

if [ "${REF_NAME}" = "main" ]; then
Expand Down

0 comments on commit b948754

Please sign in to comment.