From 0af799f348fd11706933e4f6f14f932424bcc56b Mon Sep 17 00:00:00 2001 From: Kevin Renskers Date: Mon, 31 Oct 2022 14:20:59 +0100 Subject: [PATCH] WIP --- .spi.yml | 4 ++++ Makefile | 13 +++++++++++++ Package.swift | 6 ++++++ 3 files changed, 23 insertions(+) create mode 100644 .spi.yml diff --git a/.spi.yml b/.spi.yml new file mode 100644 index 00000000000..bac0331da91 --- /dev/null +++ b/.spi.yml @@ -0,0 +1,4 @@ +version: 1 +builder: + configs: + - documentation_targets: [Sentry] diff --git a/Makefile b/Makefile index 11c6df993a4..b71a99c12ea 100644 --- a/Makefile +++ b/Makefile @@ -105,3 +105,16 @@ git-commit-add: release-pod: pod trunk push Sentry.podspec + +docs: + # Pretty print DocC JSON output so that it can be consistently diffed between commits + export DOCC_JSON_PRETTYPRINT="YES" + + # See https://apple.github.io/swift-docc-plugin/documentation/swiftdoccplugin/publishing-to-github-pages + swift package \ + generate-documentation \ + --allow-writing-to-directory ./docs \ + --target Sentry \ + --output-path ./docs \ + --transform-for-static-hosting \ + --hosting-base-path Sentry diff --git a/Package.swift b/Package.swift index 1fde2484238..55695cc234b 100644 --- a/Package.swift +++ b/Package.swift @@ -37,3 +37,9 @@ let package = Package( ], cxxLanguageStandard: .cxx14 ) + +#if swift(>=5.6) +package.dependencies += [ + .package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0") +] +#endif