-
Notifications
You must be signed in to change notification settings - Fork 116
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (29 loc) · 1.31 KB
/
Makefile
File metadata and controls
34 lines (29 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Makefile for library
format:
swift format format --parallel --recursive --in-place ./Package.swift Examples/ Sources/ Tests/
doc-dependency:
# Dynamically add the swift-docc-plugin for doc generation
cp Package.swift Package.swift.bak
for manifest in Package.swift ; do \
if [ -f "$$manifest" ] && ! grep -E -i "https://github.com/(apple|swiftlang)/swift-docc-plugin" "$$manifest" ; then \
echo "package.dependencies.append(" >> "$$manifest" ; \
echo " .package(url: \"https://github.com/swiftlang/swift-docc-plugin\", from: \"1.4.5\")" >> "$$manifest" ; \
echo ")" >> "$$manifest" ; \
fi ; \
done
preview-docs: doc-dependency
# xcrun docc preview Sources/AWSLambdaRuntime/Docs.docc --output-path docc-output
swift package --disable-sandbox preview-documentation --target AWSLambdaRuntime
mv Package.swift.bak Package.swift
# swiftpackageindex.com/awslabs/swift-aws-lambda-runtime/~/documentation/awslambdaruntime/
generate-docs: doc-dependency
touch .nojekyll
swift package \
--allow-writing-to-directory ./docs \
generate-documentation \
--target BedrockService \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path swift-aws-lambda-runtime \
--output-path ./docs
mv Package.swift.bak Package.swift