Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK-3450] API Documentation Generation #144

Merged
merged 1 commit into from
Jun 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ fastlane/screenshots/
#SwiftPM
.swiftpm/
.build/
Package.resolved
Package.resolved

# DocC
docs.archive/
12 changes: 6 additions & 6 deletions .shiprc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"files": {
"SimpleKeychain/Info.plist": [],
"SimpleKeychain.podspec": []
},
"postbump": "bundle update",
"prefixVersion": false
"files": {
"SimpleKeychain/Info.plist": [],
"SimpleKeychain.podspec": []
},
"postbump": "bundle update && bundle exec fastlane ios build_docs",
"prefixVersion": false
}
4 changes: 4 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
fastlane-plugin-auth0_shipper (0.4.1)
semantic (~> 1.5)
ffi (1.15.5)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
Expand Down Expand Up @@ -229,6 +231,7 @@ GEM
ruby2_keywords (0.0.5)
rubyzip (2.3.2)
security (0.1.3)
semantic (1.6.1)
signet (0.16.0)
addressable (~> 2.8)
faraday (>= 0.17.3, < 2.0)
Expand Down Expand Up @@ -275,6 +278,7 @@ PLATFORMS
DEPENDENCIES
cocoapods
fastlane
fastlane-plugin-auth0_shipper

BUNDLED WITH
2.1.4
11 changes: 11 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,15 @@ platform :ios do
perform_release target: 'SimpleKeychain-iOS'
publish_release repository: 'SimpleKeychain'
end

desc "Generate API documentation"
lane :build_docs do
# Work from project root (defaults to /fastlane)
Dir.chdir("..") do
# Generate the .doccarchive
sh "xcodebuild docbuild -scheme SimpleKeychain-iOS -configuration Release -destination 'generic/platform=iOS' -derivedDataPath docs.archive"
# Generate the static site
sh "$(xcrun --find docc) process-archive transform-for-static-hosting docs.archive/Build/Products/Release-iphoneos/SimpleKeychain.doccarchive --hosting-base-path SimpleKeychain --output-path docs"
Copy link
Member Author

@evansims evansims Jun 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You were right about --hosting-base-path being necessary — my bad! 👍 I've already made the change over on JWTDecode.swift to reflect this as well.

end
end
end
5 changes: 5 additions & 0 deletions fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ Runs all the tests in a CI environment
fastlane ios release
```
Tags the release and pushes the Podspec to CocoaPods
### ios build_docs
```
fastlane ios build_docs
```
Generate API documentation

----

Expand Down