15
15
16
16
require 'httparty'
17
17
18
- zip_file = ''
19
-
20
18
default_platform ( :ios )
21
19
22
20
build_path = "BuildTemp/Archives"
23
21
derived_data_path = "DerivedData"
24
22
ios_plist = "./Info.plist"
25
- appcenter_token = "bf0ae509c985f2a1102c2ad53894b35a5fa5383e"
26
23
project = './PlaybookShowcase/PlaybookShowcase.xcodeproj'
27
24
28
25
def target_ios ( suffix = nil )
@@ -106,35 +103,11 @@ end
106
103
desc "Upload iOS build"
107
104
lane :upload_ios do |opts |
108
105
keep_trying {
109
- ship_ios_to_appcenter ( opts )
110
106
opts [ :platform ] = "ios"
111
107
distribute_to_mdm ( opts )
112
108
}
113
109
end
114
110
115
- desc "Ship iOS to App Center"
116
- lane :ship_ios_to_appcenter do |opts |
117
-
118
- app_name = "Playbook-Showcase-Beta"
119
- if opts [ :type ] == 'production'
120
- app_name = "Playbook-Showcase"
121
- end
122
-
123
- opts [ :os ] = 'ios'
124
- appcenter_upload (
125
- api_token : appcenter_token ,
126
- owner_name : "powerhome" ,
127
- owner_type : "organization" ,
128
- app_name : app_name ,
129
- file : "#{ target_ios ( opts [ :suffix ] ) } .ipa" ,
130
- version : "#{ opts [ :build_number ] } " ,
131
- release_notes : "#{ opts [ :release_notes ] } " ,
132
- destinations : "Rebels" ,
133
- destination_type : "group" ,
134
- upload_build_only : false
135
- )
136
- end
137
-
138
111
desc "Export App Pass to Environment"
139
112
lane :export_app_pass do |opts |
140
113
# Add app-specific-password to environment variable
@@ -156,40 +129,11 @@ end
156
129
desc "Upload macOS build"
157
130
lane :upload_macos do |opts |
158
131
keep_trying {
159
- ship_macos_to_appcenter ( opts )
160
132
opts [ :platform ] = "macos"
161
133
distribute_to_mdm ( opts )
162
134
}
163
135
end
164
136
165
- desc "Ship macOS to App Center"
166
- lane :ship_macos_to_appcenter do |opts |
167
-
168
- app_name = "Playbook-Swift-Mac-Beta"
169
- if opts [ :type ] == 'production'
170
- app_name = "Playbook-Swift-Mac"
171
- end
172
-
173
- #compress file
174
- zip_file = "#{ target_macos ( opts [ :suffix ] ) } .zip"
175
- sh "ditto -c -k --sequesterRsrc --keepParent '../#{ target_macos ( opts [ :suffix ] ) } .app' '../#{ zip_file } '"
176
-
177
- opts [ :os ] = 'macos'
178
- appcenter_upload (
179
- api_token : appcenter_token ,
180
- owner_name : "powerhome" ,
181
- owner_type : "organization" ,
182
- app_name : app_name ,
183
- app_os : "macOS" ,
184
- file : zip_file ,
185
- version : "#{ opts [ :build_number ] } " ,
186
- release_notes : "#{ opts [ :release_notes ] } " ,
187
- destinations : "Rebels" ,
188
- destination_type : "group" ,
189
- upload_build_only : false
190
- )
191
- end
192
-
193
137
desc "Upload to Nitro MDM"
194
138
lane :distribute_to_mdm do |opts |
195
139
@@ -212,7 +156,7 @@ lane :distribute_to_mdm do |opts|
212
156
213
157
file_path = "../#{ target_ios ( opts [ :suffix ] ) } .ipa"
214
158
if platform == "macos"
215
- file_path = "../#{ zip_file } "
159
+ file_path = "../#{ target_macos ( opts [ :suffix ] ) } .app.zip "
216
160
end
217
161
output_file = "../upload-build-to-nitro-details.json"
218
162
@@ -251,34 +195,21 @@ lane :create_runway_comment do |opts|
251
195
build_number = opts [ :build_number ]
252
196
release_notes = "#{ opts [ :release_notes ] } "
253
197
254
- ios_app_name = "Playbook-Showcase-Beta"
255
- if type == 'production'
256
- app_name = "Playbook-Showcase"
257
- end
258
-
259
- macos_app_name = "Playbook-Swift-Mac-Beta"
198
+ app_id = "com.powerhrg.PlaybookShowcase.dev"
260
199
if type == 'production'
261
- app_name = "Playbook-Swift-Mac "
200
+ app_name = "com.powerhrg.PlaybookShowcase "
262
201
end
263
202
264
203
merged_comment = ''
265
204
if type == 'production'
266
205
merged_comment = "✅ MERGED ✅\n \n "
267
206
end
268
207
269
- # https://install.appcenter.ms/orgs/powerhome/apps/#{app_name}/releases/#{release_num}
270
- # Generate the link above based on this call:
271
- version_info = appcenter_fetch_version_number (
272
- api_token : appcenter_token ,
273
- owner_name : "powerhome" ,
274
- app_name : ios_app_name
275
- )
276
-
277
208
comment = <<~HEREDOC
278
209
<p><b>#{ merged_comment } #{ type } build #{ build_number } </b></p>
279
210
<ul>
280
- <li>PlaybookShowcase-iOS: <a href=#{ "https://install.appcenter.ms/orgs/powerhome/apps/ #{ ios_app_name } /releases/ #{ version_info [ "id" ] } " } >iOS</a></li>
281
- <li>PlaybookShowcase-macOS: <a href=#{ "https://install.appcenter.ms/orgs/powerhome/apps/ #{ macos_app_name } /releases/ #{ version_info [ "id" ] } " } >macOS</a></li>
211
+ <li>PlaybookShowcase-iOS: <a href=#{ "https://nitro.powerhrg.com/mdm/app_builds/ #{ app_id } /iOS" } >iOS Build #{ build_number } </a></li>
212
+ <li>PlaybookShowcase-macOS: <a href=#{ "https://nitro.powerhrg.com/mdm/app_builds/ #{ app_id } /macOS" } >macOS Build #{ build_number } </a></li>
282
213
</ul>
283
214
HEREDOC
284
215
0 commit comments