mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
# 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
29 lines
962 B
Bash
Executable File
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."
|