Skip to content
Snippets Groups Projects
Verified Commit 2a528e61 authored by Chris Coley's avatar Chris Coley
Browse files

Include symlinks when purging URLs

parent 0b279256
Branches
No related tags found
No related merge requests found
......@@ -85,19 +85,15 @@ create-purge-json:
# Add the index-less homepage, with and without trailing slash
echo -en "\n \"$CI_PAGES_URL\"" >> purge.json
echo -en ",\n \"$CI_PAGES_URL/\"" >> purge.json
# Add all the directories, with and without trailing slash
for d in $(find public/* -type d); do
echo -en ",\n \"$CI_PAGES_URL/${d#public/}\"" >> purge.json
echo -en ",\n \"$CI_PAGES_URL/${d#public/}/\"" >> purge.json
done
# Add all the non-HTML files, with and without trailing slash
for f in $(find public -type f -not -iname '*.html'); do
# Add all the directories, non-HTML files and non-HTML symlinks; with and
# without trailing slash
for f in $(find public \( -type d -or -type f -or -type l \) -not -iname '*.html'); do
echo -en ",\n \"$CI_PAGES_URL/${f#public/}\"" >> purge.json
echo -en ",\n \"$CI_PAGES_URL/${f#public/}/\"" >> purge.json
done
# Add all the HTML files, with and without trailing slash. First with file
# extension, then without
for f in $(find public -type f -iname '*.html'); do
# Add all the HTML files and HTML symlinks, with and without trailing
# slash. First with file extension, then without
for f in $(find public \( -type f -or -type l \) -iname '*.html'); do
echo -en ",\n \"$CI_PAGES_URL/${f#public/}\"" >> purge.json
echo -en ",\n \"$CI_PAGES_URL/${f#public/}/\"" >> purge.json
f="${f%.html}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment