-
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
translation: Move site verification after downloading all languages
Do not attempt to verify correctness of the website before refreshing all languages. If any structural change happened (rename, permalink change etc), it will fail because of the old files, not the freshly downloaded ones. Make htmlproofer postprocessing script language agnostic. This is mostly about removing "language" parameter, which wasn't used anyway.
- Loading branch information
Showing
4 changed files
with
36 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
# to be run from the git root | ||
# $1 is directory where translated files reside and language needs to be added to internal urls | ||
# TODO param check | ||
|
||
set -e | ||
|
||
echo "================================= build site ==================================" | ||
#read b | ||
bundle exec jekyll b | ||
|
||
all_ok=true | ||
echo "================================= run htmlproofer ===============================" | ||
htmlproofer ./_site --disable-external --checks-to-ignore ImageCheck --file-ignore "./_site/video-tours/index.html,./_site/.*/video-tours/index.html" --url-ignore "/qubes-issues/" --log-level debug 2&> /tmp/html.output || all_ok=false | ||
|
||
# exit here if all is ok | ||
if $all_ok; then | ||
echo 'All checks passed!' | ||
exit | ||
fi | ||
|
||
echo "================================== as a last resort in case of errors process html proofer errors =================================" | ||
python3 _utils/_translation_utils/postprocess_htmlproofer.py /tmp/html.output "$1" | ||
|
||
echo "================================= build the site and run htmlproofer ====================================" | ||
rm -rf ./_site/ | ||
bundle exec jekyll b | ||
htmlproofer ./_site --disable-external --checks-to-ignore ImageCheck --file-ignore "./_site/video-tours/index.html,./_site/.*/video-tours/index.html" --url-ignore "/qubes-issues/" --log-level debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,8 @@ for lang in "$@"; do | |
bash _utils/_translation_utils/post_transifex_pull.sh "$lang" _translated/"$lang" | ||
done | ||
|
||
bash _utils/_translation_utils/check_all_langs.sh | ||
|
||
# switch to ssh for push | ||
git -C _translated remote set-url origin [email protected]:QubesOS/qubes-translated | ||
|
||
|