Add documentation lane to Fastlane
This commit is contained in:
parent
3be8310ebb
commit
08d7761955
|
@ -13,7 +13,7 @@ platform :ios do
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Test ===================
|
# Test =======================
|
||||||
|
|
||||||
desc "Run unit tests"
|
desc "Run unit tests"
|
||||||
lane :test do
|
lane :test do
|
||||||
|
@ -21,7 +21,15 @@ platform :ios do
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Version ================
|
# Docs =======================
|
||||||
|
|
||||||
|
desc "Build documentation"
|
||||||
|
lane :documentation do
|
||||||
|
sh('cd .. && fastlane/build-documentation.sh')
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# Version ====================
|
||||||
|
|
||||||
desc "Create a new version"
|
desc "Create a new version"
|
||||||
lane :version do |options|
|
lane :version do |options|
|
||||||
|
@ -30,6 +38,7 @@ platform :ios do
|
||||||
|
|
||||||
lint
|
lint
|
||||||
test
|
test
|
||||||
|
documentation
|
||||||
|
|
||||||
bump_type = options[:type]
|
bump_type = options[:type]
|
||||||
if bump_type == nil or bump_type.empty?
|
if bump_type == nil or bump_type.empty?
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
rm -rf Docs
|
||||||
|
mkdir -p Docs
|
||||||
|
|
||||||
|
xcodebuild docbuild \
|
||||||
|
-scheme SwiftKit \
|
||||||
|
-destination generic/platform=iOS \
|
||||||
|
|
||||||
|
echo "Copying documentation archive..."
|
||||||
|
|
||||||
|
find ~/Library/Developer/Xcode/DerivedData \
|
||||||
|
-name "SwiftKit.doccarchive" \
|
||||||
|
-exec cp -R {} Docs \;
|
||||||
|
|
||||||
|
cd Docs
|
||||||
|
|
||||||
|
echo "Compressing documentation archive..."
|
||||||
|
|
||||||
|
zip -r \
|
||||||
|
SwiftKit.doccarchive.zip \
|
||||||
|
SwiftKit.doccarchive
|
||||||
|
|
||||||
|
rm -rf SwiftKit.doccarchive
|
||||||
|
|
||||||
|
cd ..
|
Loading…
Reference in New Issue