Files
swift-nio/scripts/check-docs.sh
T
Franz Busch 28f9cae996 [CI] Fix docs check (#2811)
# Motivation

I broke the docs check in one of my previous PRs.

# Modification

This PR fixes the docs check again.

# Result

No more broken CI
2024-07-25 17:52:34 +01:00

29 lines
962 B
Bash
Executable File

#!/bin/bash
##===----------------------------------------------------------------------===##
##
## This source file is part of the SwiftNIO open source project
##
## Copyright (c) 2023 Apple Inc. and the SwiftNIO project authors
## Licensed under Apache License v2.0
##
## See LICENSE.txt for license information
## See CONTRIBUTORS.txt for the list of SwiftNIO project authors
##
## SPDX-License-Identifier: Apache-2.0
##
##===----------------------------------------------------------------------===##
set -euo pipefail
log() { printf -- "** %s\n" "$*" >&2; }
error() { printf -- "** ERROR: %s\n" "$*" >&2; }
fatal() { error "$@"; exit 1; }
log "Checking documentation targets..."
for target in $(yq -r '.builder.configs[].documentation_targets[]' .spi.yml); do
log "Checking target $target..."
swift package plugin generate-documentation --target "$target" --warnings-as-errors --analyze --level detailed
done
log "✅ Found no documentation issues."