Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(common): add markdown link check test for product documentation #12472

Merged
merged 7 commits into from
Oct 11, 2024
Prev Previous commit
Next Next commit
chore(common): address review comments
  • Loading branch information
mcdurdin committed Oct 9, 2024
commit 016a6f0225538d0973b79320f370c324386339e3
2 changes: 1 addition & 1 deletion android/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"

builder_describe \
"Build Keyman Engine for Android, Keyman for Android, and FirstVoices Android app." \
"@/resources/tools/check-markdown test:help" \
clean \
configure \
build \
test \
"@/resources/tools/check-markdown test:help" \
"publish Publishes symbols to Sentry and the APKs to the Play Store." \
--ci+ \
--upload-sentry+ \
Expand Down
2 changes: 1 addition & 1 deletion developer/src/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"

builder_describe \
"Keyman Developer" \
"@/resources/tools/check-markdown test:help" \
clean \
configure \
build \
test \
"@/resources/tools/check-markdown test:help" \
"api Analyze API and prepare API documentation" \
"publish Prepare files for distribution, publish symbols, publish or pack npm packages, and build installer" \
"install Install built programs locally" \
Expand Down
7 changes: 1 addition & 6 deletions ios/build.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
#!/usr/bin/env bash

## START STANDARD BUILD SCRIPT INCLUDE
# adjust relative paths as necessary
THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
. "${THIS_SCRIPT%/*}/../resources/build/builder.inc.sh"
## END STANDARD BUILD SCRIPT INCLUDE

# Include our resource functions; they're pretty useful!
. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh"

# Please note that this build script (understandably) assumes that it is running on Mac OS X.
# verify_on_mac

builder_describe "Builds Keyman Engine and the Keyman app for use on iOS devices - iPhone and iPad." \
"@/resources/tools/check-markdown test:help" \
"clean" \
"configure" \
"build" \
"test" \
"@/resources/tools/check-markdown test:help" \
":engine Builds KeymanEngine.xcframework, usable by our main app and by third-party apps" \
":app=keyman Builds the Keyman app for iOS platforms" \
":help Online documentation" \
Expand Down
4 changes: 0 additions & 4 deletions mac/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")"
. "${THIS_SCRIPT%/*}/../resources/build/builder.inc.sh"
## END STANDARD BUILD SCRIPT INCLUDE

# Include our resource functions; they're pretty useful!
. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh"
. "$KEYMAN_ROOT/resources/build/build-help.inc.sh"
. "$KEYMAN_ROOT/mac/mac-utils.inc.sh"
Expand All @@ -25,9 +24,6 @@ builder_describe "Builds Keyman for macOS." \
":testapp Keyman4Mac (test harness)" \
"--quick,-q Bypasses notarization for $(builder_term install)"

# Please note that this build script (understandably) assumes that it is running on Mac OS X.
# verify_on_mac

builder_parse "$@"

# Default is release build of Engine and (code-signed) Input Method
Expand Down
6 changes: 3 additions & 3 deletions resources/tools/check-markdown/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ function run() {

const files = findFiles(root);
const links = parseFiles(root, files);
const result = checkLinks(root, links);
const checkLinksSucceeded = checkLinks(root, links);

for(const file of links) {
if(file.messages.length) {
reportMessages(root, result && verbose /* only give verbose output if no errors */, file);
reportMessages(root, checkLinksSucceeded && verbose /* only give verbose output if no errors */, file);
}
}

process.exit(result ? 0 : 1);
process.exit(checkLinksSucceeded ? 0 : 1);
}{

}
Expand Down
Loading