@@ -4,6 +4,8 @@ default_platform :ios
44
55platform :ios do
66
7+ build_folder_docs = ".build/docs"
8+
79
810 # Documentation ==============
911
@@ -64,7 +66,7 @@ platform :ios do
6466
6567 desc "Build documentation for all platforms"
6668 lane :docc do
67- sh ( 'cd .. && rm -rf Docs' )
69+ sh ( 'cd .. && rm -rf ' + build_folder_docs )
6870 docc_platform ( destination : 'iOS' , name : 'ios' )
6971 docc_platform ( destination : 'OS X' , name : 'osx' )
7072 docc_platform ( destination : 'tvOS' , name : 'tvos' )
@@ -73,17 +75,17 @@ platform :ios do
7375
7476 desc "Build documentation for a single platform"
7577 lane :docc_platform do |values |
76- sh ( 'cd .. && mkdir -p Docs' )
78+ sh ( 'cd .. && mkdir -p ' + build_folder_docs )
7779 docc_delete_derived_data
7880 sh ( 'cd .. && xcodebuild docbuild \
7981 -scheme SwiftUIKit \
8082 -destination \'generic/platform=' + values [ :destination ] + '\'' )
8183 sh ( 'cd .. && \
8284 find ~/Library/Developer/Xcode/DerivedData \
8385 -name "SwiftUIKit.doccarchive" \
84- -exec cp -R {} Docs \;' )
86+ -exec cp -R {} ' + build_folder_docs + ' \;')
8587 sh ( 'cd .. && \
86- mv Docs /SwiftUIKit.doccarchive Docs /SwiftUIKit_' + values [ :name ] + '.doccarchive' )
88+ mv ' + build_folder_docs + ' /SwiftUIKit.doccarchive ' + build_folder_docs + ' /SwiftUIKit_' + values [ :name ] + '.doccarchive' )
8789 end
8890
8991 desc "Delete documentation derived data (may be historic duplicates)"
@@ -105,8 +107,8 @@ platform :ios do
105107 desc "Build static documentation website for a single platform"
106108 lane :docc_web_platform do |values |
107109 sh ( 'cd .. && $(xcrun --find docc) process-archive \
108- transform-for-static-hosting Docs /SwiftUIKit_' + values [ :name ] + '.doccarchive \
109- --output-path Docs /web_' + values [ :name ] + ' \
110+ transform-for-static-hosting ' + build_folder_docs + ' /SwiftUIKit_' + values [ :name ] + '.doccarchive \
111+ --output-path ' + build_folder_docs + ' /web_' + values [ :name ] + ' \
110112 --hosting-base-path SwiftUIKit' )
111113 end
112114
0 commit comments