mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Motivation: Up until recently, it has not been possible to regression check our documentation. However, in recent releases of the DocC plugin it has become possible to make warnings into errors, making it possible for us to CI our docs. This patch adds support for doing that, and also cleans up our documentation so that it successfully passes the check. Along the way I accidentally wrote an `index.md` for `NIOCore` so I figure we may as well keep it. Modifications: - Structure the documentation for NIOCore - Fix up DocC issues - Add `check-docs.sh` script to check the docs cleanly build - Wire things up to our docker-compose scripts. Result: We can CI our docs. Co-authored-by: George Barnett <gbarnett@apple.com>
24 lines
784 B
Bash
Executable File
24 lines
784 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 -eu
|
|
|
|
raw_targets=$(sed -E -n -e 's/^.* - documentation_targets: \[(.*)\].*$/\1/p' .spi.yml)
|
|
targets=(${raw_targets//,/ })
|
|
|
|
for target in "${targets[@]}"; do
|
|
swift package plugin generate-documentation --target "$target" --warnings-as-errors --analyze --level detailed
|
|
done
|