Skip to content
Snippets Groups Projects
Commit cb4a0276 authored by Martin Schroschk's avatar Martin Schroschk
Browse files

Add option to check only internal links for MR

parent c309462d
No related branches found
No related tags found
2 merge requests!1138Automated merge from preview to main,!1129Refactor script check-links
...@@ -36,6 +36,7 @@ usage: $0 [file | -a | -c] ...@@ -36,6 +36,7 @@ usage: $0 [file | -a | -c]
Options: Options:
<file> Check links in the provided markdown file <file> Check links in the provided markdown file
-a; --all Check links in all markdown files -a; --all Check links in all markdown files
-i; --interal Check links in all markdown files (internal links only)
-c; --changed Check links in all git-changed files -c; --changed Check links in all git-changed files
EOF EOF
} }
...@@ -101,7 +102,6 @@ function check_changed_files(){ ...@@ -101,7 +102,6 @@ function check_changed_files(){
# Make use of the html-proofer-plugin and build documentation # Make use of the html-proofer-plugin and build documentation
function check_all_files_hpp() { function check_all_files_hpp() {
export ENABLED_HTMLPROOFER=true export ENABLED_HTMLPROOFER=true
export ENABLED_HTMLPROOFER_EXTERNAL_URLS=true
echo "Info: Building documentation and checking internal and external links. Might take some time." echo "Info: Building documentation and checking internal and external links. Might take some time."
# Switch for wikiscript # Switch for wikiscript
if [[ -d "doc.zih.tu-dresden.de" ]]; then if [[ -d "doc.zih.tu-dresden.de" ]]; then
...@@ -118,6 +118,11 @@ if [[ $# -ge 1 ]]; then ...@@ -118,6 +118,11 @@ if [[ $# -ge 1 ]]; then
exit exit
;; ;;
-a | --all) -a | --all)
export ENABLED_HTMLPROOFER_EXTERNAL_URLS=true
check_all_files_hpp
;;
-i | --internal)
export ENABLED_HTMLPROOFER_EXTERNAL_URLS=false
check_all_files_hpp check_all_files_hpp
;; ;;
-c | --changed) -c | --changed)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment