diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2020-05-29 12:45:54 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2020-05-29 12:48:14 +0300 |
commit | c9e0092e99cd4b55f8ace7e46ff11de83e7a08e5 (patch) | |
tree | e5798779162ee8c24d83d1724ab283f1b775af81 /scripts | |
parent | 7755c682a100556f84a2cecdc7b59500e8727511 (diff) |
Add /frontend to list of things to prefix with version
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/normalize-links.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/normalize-links.sh b/scripts/normalize-links.sh index 230f817f..518f4abc 100755 --- a/scripts/normalize-links.sh +++ b/scripts/normalize-links.sh @@ -22,7 +22,8 @@ fi ## ## In order for the version to be correct, we need to replace any occurrences -## of relative or full URLs with the respective version. +## of relative or full URLs with the respective version. Basically, prefix +## all top level directories (except archives/) under public/ with the version. ## ## ## Relative URLs @@ -45,6 +46,9 @@ find ${TARGET} -type f -name '*.html' -print0 | xargs -0 sed -i 's#="/charts/#=" echo "Replace relative URLs in $TARGET/$VER for /assets/" find ${TARGET} -type f -name '*.html' -print0 | xargs -0 sed -i 's#="/assets/#="/'"$VER"'/assets/#g' +echo "Replace relative URLs in $TARGET/$VER for /frontend/" +find ${TARGET} -type f -name '*.html' -print0 | xargs -0 sed -i 's#="/frontend/#="/'"$VER"'/frontend/#g' + echo "Replace relative URLs in $TARGET/$VER for /" find ${TARGET} -type f -name '*.html' -print0 | xargs -0 sed -i 's#<a href="/">#<a href="/'"$VER"'/">#g' |