mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
…and remove docc plugin # Motivation Some repositories might want to run their soundness and matrix jobs checks on different container images e.g. a repo might build against the nightly toolchains only so their soundness jobs should also use nightly images. Other repos might want to build against a different linux distribution since their usual deployment target is not Ubuntu based. Additionally, we currently require our repos to depend on the docc plugin for building documentation which adds an unnecessary dependency to all of our packages. # Modification This PR makes the container images for the soundness and matrix jobs configurable. Furthermore, it modifies the docs check script to add the docc-plugin dependency and removes the current dependency from our manifest. # Result Our workflows can be adopted by more repositories.
36 lines
1.1 KiB
Bash
Executable File
36 lines
1.1 KiB
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 "Editing Package.swift..."
|
|
cat <<EOF >> "Package.swift"
|
|
package.dependencies.append(
|
|
.package(url: "https://github.com/apple/swift-docc-plugin", "1.0.0"..<"1.4.0")
|
|
)
|
|
EOF
|
|
|
|
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."
|