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

sync/20241220 5 #318

Merged
merged 5 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,15 @@

. "$(pwd)"/.github/utils/util-functions.sh

WORKFLOWFILE=${0##*/}

#-------------------------------------------------------------------------------
# Functions
#-------------------------------------------------------------------------------

check_acap_ver_urls() {
local ret=0

# Whitelist this file
local workflowfile=lint-acap-version-urls.sh

# Version specific URL strings
local acap3_type_urls="help.axis.com/acap-3-developer-guide \
www.axis.com/techsup/developer_doc"
Expand Down Expand Up @@ -40,7 +39,7 @@ check_acap_ver_urls() {

# Check for incorrect URLs
for doc_url in $search_urls; do
__found_doc_url=$(grep -niIr "$doc_url" --exclude $workflowfile)
__found_doc_url=$(grep -niIr "$doc_url" --exclude "$WORKFLOWFILE")
[ -z "$__found_doc_url" ] || {
print_line "ERROR: URL of ACAP version $incorrect_sdk_version found in ACAP version $correct_sdk_version."
print_line " URL '$doc_url' found in the following files:"
Expand All @@ -56,6 +55,34 @@ check_acap_ver_urls() {
return $ret
}

check_acap_doc_no_md_in_link() {
local ret=0

# local search_urls="axiscommunications.github.io/acap-documentation"
local search_urls="axiscommunications.github.io/acap-documentation.*\.md.*"

print_section "Verify that the docs don't have links to ACAP documentation with .md"

# Check for incorrect URLs
for doc_url in $search_urls; do
# __found_doc_url=$(grep -niIrE "$doc_url.*\.md.*")
__found_doc_url=$(grep -niIrE "$doc_url" --exclude "$WORKFLOWFILE")
[ -z "$__found_doc_url" ] || {
print_line "ERROR: Found URL to ACAP documentation containing '.md', which gives broken link."
print_line " This is due to that ACAP documentation converts Markdown to HTML."
print_line " Search pattern: '$doc_url'"
print_linebreaked_list_error "$__found_doc_url"
ret=1
}
done

[ "$__found_doc_url" ] || {
print_bullet_pass "No ACAP documentation links found to contain '.md'."
}

return $ret
}

#-------------------------------------------------------------------------------
# Main
#-------------------------------------------------------------------------------
Expand All @@ -64,6 +91,7 @@ exit_value=0
found_error=no

if ! check_acap_ver_urls; then found_error=yes; fi
if ! check_acap_doc_no_md_in_link; then found_error=yes; fi

[ "$found_error" = no ] || exit_value=1

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linter-documentation-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
run: |
.github/custom-linters/lint-device-urls.sh

- name: Verify that the docs don't have links to wrong SDK format
- name: Verify that there are no incorrect links to ACAP documentation
if: always()
run: |
.github/custom-linters/lint-acap-version-urls.sh
.github/custom-linters/lint-acap-documentation-urls.sh
2 changes: 1 addition & 1 deletion curl-openssl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ docker build --build-arg APP_DEBUG=yes --tag <APP_IMAGE> --build-arg ARCH=<ARCH>

If the device is inside a network with a proxy, the global device proxy must be
set to allow curl to pick it up at runtime. For reference see
[Configure global device proxy](https://axiscommunications.github.io/acap-documentation/docs/develop/global-device-proxy.md#configure-global-device-proxy).
[Configure global device proxy](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#configure-global-device-proxy).

Copy the result from the container image to a local directory `build`:

Expand Down
3 changes: 2 additions & 1 deletion utility-libraries/custom_lib_example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ Standing in your working directory run the following commands:
> [!NOTE]
>
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for docker. See [Proxy in build time](../DEV.md#proxy-in-build-time).
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

```sh
docker build --tag <APP_IMAGE> .
Expand Down
35 changes: 17 additions & 18 deletions utility-libraries/openssl_curl_example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,21 @@ on a device.

<!-- ToC GFM -->

- [Build custom OpenSSL and curl libraries and use them in an ACAP application](#build-custom-openssl-and-curl-libraries-and-use-them-in-an-acap-application)
- [Table of contents](#table-of-contents)
- [Purpose of the example](#purpose-of-the-example)
- [OpenSSL and curl APIs](#openssl-and-curl-apis)
- [Getting started](#getting-started)
- [How to run the code](#how-to-run-the-code)
- [Build the application](#build-the-application)
- [Install and start the application](#install-and-start-the-application)
- [The expected output](#the-expected-output)
- [Transferred file](#transferred-file)
- [Application log](#application-log)
- [Outline of build steps](#outline-of-build-steps)
- [Runtime shared library search path](#runtime-shared-library-search-path)
- [Check build dependencies](#check-build-dependencies)
- [Troubleshooting](#troubleshooting)
- [Error CURLE\_PEER\_FAILED\_VERIFICATION (60)](#error-curle_peer_failed_verification-60)
- [License](#license)
- [Purpose of the example](#purpose-of-the-example)
- [OpenSSL and curl APIs](#openssl-and-curl-apis)
- [Getting started](#getting-started)
- [How to run the code](#how-to-run-the-code)
- [Build the application](#build-the-application)
- [Install and start the application](#install-and-start-the-application)
- [The expected output](#the-expected-output)
- [Transferred file](#transferred-file)
- [Application log](#application-log)
- [Outline of build steps](#outline-of-build-steps)
- [Runtime shared library search path](#runtime-shared-library-search-path)
- [Check build dependencies](#check-build-dependencies)
- [Troubleshooting](#troubleshooting)
- [Error CURLE_PEER_FAILED_VERIFICATION (60)](#error-curle_peer_failed_verification-60)
- [License](#license)

<!-- /ToC -->

Expand Down Expand Up @@ -115,7 +113,8 @@ the application on a device.
> [!NOTE]
>
> Depending on the network your local build machine is connected to, you may need to add proxy
> settings for docker. See [Proxy in build time](../DEV.md#proxy-in-build-time).
> settings for Docker. See
> [Proxy in build time](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#proxy-in-build-time).

Standing in your working directory run:

Expand Down
2 changes: 1 addition & 1 deletion vapix/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ACAP application. Some examples:
- If the device has set global device proxy, reaching the local virtual host
(127.0.0.12) is only possible if 127.0.0.12 is added to the `No proxy` list,
as described in
[Configure global device proxy](https://axiscommunications.github.io/acap-documentation/docs/develop/global-device-proxy.md#configure-global-device-proxy).
[Configure global device proxy](https://axiscommunications.github.io/acap-documentation/docs/develop/proxy#configure-global-device-proxy).

## Getting started

Expand Down
Loading