@@ -4,6 +4,8 @@ default_platform :ios
4
4
5
5
platform :ios do
6
6
7
+ build_folder_docs = ".build/docs"
8
+
7
9
8
10
# Documentation ==============
9
11
@@ -64,7 +66,7 @@ platform :ios do
64
66
65
67
desc "Build documentation for all platforms"
66
68
lane :docc do
67
- sh ( 'cd .. && rm -rf Docs' )
69
+ sh ( 'cd .. && rm -rf ' + build_folder_docs )
68
70
docc_platform ( destination : 'iOS' , name : 'ios' )
69
71
docc_platform ( destination : 'OS X' , name : 'osx' )
70
72
docc_platform ( destination : 'tvOS' , name : 'tvos' )
@@ -73,17 +75,17 @@ platform :ios do
73
75
74
76
desc "Build documentation for a single platform"
75
77
lane :docc_platform do |values |
76
- sh ( 'cd .. && mkdir -p Docs' )
78
+ sh ( 'cd .. && mkdir -p ' + build_folder_docs )
77
79
docc_delete_derived_data
78
80
sh ( 'cd .. && xcodebuild docbuild \
79
81
-scheme SwiftUIKit \
80
82
-destination \'generic/platform=' + values [ :destination ] + '\'' )
81
83
sh ( 'cd .. && \
82
84
find ~/Library/Developer/Xcode/DerivedData \
83
85
-name "SwiftUIKit.doccarchive" \
84
- -exec cp -R {} Docs \;' )
86
+ -exec cp -R {} ' + build_folder_docs + ' \;')
85
87
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' )
87
89
end
88
90
89
91
desc "Delete documentation derived data (may be historic duplicates)"
@@ -105,8 +107,8 @@ platform :ios do
105
107
desc "Build static documentation website for a single platform"
106
108
lane :docc_web_platform do |values |
107
109
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 ] + ' \
110
112
--hosting-base-path SwiftUIKit' )
111
113
end
112
114
0 commit comments