fastlane-plugin-appcenter 2.1.0 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 678941e5b3f03b4d5b89d3ad1491342314a996fbb97e65a543f61709f142f426
4
- data.tar.gz: dafeebaabaa42d5e20df0226680714f413e8cdd9a830c2fb987981c622ecece4
3
+ metadata.gz: f608638152db3997ce1692db80d1feb26887237a481b9563beb55c82fe3489b9
4
+ data.tar.gz: 2c80e7cd95399e66ffd4360e5bbef035ade40e63e83634faf3cfc5f684d55924
5
5
  SHA512:
6
- metadata.gz: 012b6080ce993cb77e8ed11c517e525ded5f684b37cbd8852adefc7dea0eeacbcdb5be86284874e26f431df5772c698aab771dca1a33fc67a3767b7d86bdf757
7
- data.tar.gz: f89842ee90dccf84f3bb4cf63036967a9684f5f1df195d9c771f055879c4be79e994020e5af4eaac4cc3a8a0ff2bf10d67d4280d887eacdbd0a2c7cebf9cfba4
6
+ metadata.gz: 74e1a3dec9666c6a3dd8857187b489a0d4bc651817b1b5927dbb26d72694a7452d3c6e90acfe89ba8dc66fa9758a85df505c0e0ff8a81d4cc09a28e2c2500752
7
+ data.tar.gz: 4572d2108d8c6eedb4f78784caff77abe527b3c249efc946dcca716f006106b6c3b338788f2d83a0e2daa664e7363482d6bf0393f3101abe00548792928d85fc
data/README.md CHANGED
@@ -161,8 +161,9 @@ Here is the list of all existing parameters:
161
161
  | `bundle_name` <br/> `APPCENTER_CODEPUSH_BUNDLE_NAME` | Specifies the name of the bundle file |
162
162
  | `output_dir` <br/> `APPCENTER_CODEPUSH_OUTPUT` | Specifies path to where the bundle and sourcemap should be written |
163
163
  | `sourcemap_output` <br/> `APPCENTER_CODEPUSH_SOURCEMAP_OUTPUT` | Specifies path to write sourcemaps to |
164
- | `development` <br/> `APPCENTER_CODEPUH_DEVELOPMENT` | Specifies whether to generate dev or release build (default: `false`) |
165
- | `private_key_path` <br/> `APPCENTER_CODEPUSH_PRIVATE_KEY_PATH` | Specifies path to private key that will be used for signing bundles" |
164
+ | `development` <br/> `APPCENTER_CODEPUSH_DEVELOPMENT` | Specifies whether to generate dev or release build (default: `false`) |
165
+ | `private_key_path` <br/> `APPCENTER_CODEPUSH_PRIVATE_KEY_PATH` | Specifies path to private key that will be used for signing bundles |
166
+ | `extra_bundler_options` <br/> `APPCENTER_CODEPUSH_EXTRA_BUNDLER_OPTIONS` | A list of extra options that get passed to the react-native bundler |
166
167
 
167
168
  ## Example
168
169
 
@@ -30,11 +30,15 @@ module Fastlane
30
30
  private_key_path = params[:private_key_path]
31
31
  dry_run = params[:dry_run]
32
32
  use_local_appcenter_cli = params[:use_local_appcenter_cli]
33
+ plist_file = params[:plist_file]
34
+ xcode_project_file = params[:xcode_project_file]
35
+ use_hermes = params[:use_hermes]
36
+ extra_bundler_options = params[:extra_bundler_options]
33
37
 
34
38
  base_executable = "appcenter "
35
39
 
36
40
  if use_local_appcenter_cli
37
- base_executable = "npm exec " + base_executable
41
+ base_executable = "npm exec -- " + base_executable
38
42
  end
39
43
 
40
44
  command = base_executable + "codepush release-react --token #{token} --app #{owner}/#{app} --deployment-name #{deployment} --development #{dev} "
@@ -66,6 +70,19 @@ module Fastlane
66
70
  if private_key_path
67
71
  command += "--private-key-path #{private_key_path} "
68
72
  end
73
+ if plist_file
74
+ command += "--plist-file #{plist_file} "
75
+ end
76
+ if xcode_project_file
77
+ command += "--xcode-project-file #{xcode_project_file} "
78
+ end
79
+ unless use_hermes.nil?
80
+ command += "--use-hermes #{use_hermes} "
81
+ end
82
+ if extra_bundler_options
83
+ command += extra_bundler_options.map { |option| "--extra-bundler-option='#{option}' " }.join
84
+ end
85
+
69
86
  if dry_run
70
87
  UI.message("Dry run!".red + " Would have run: " + command + "\n")
71
88
  else
@@ -162,12 +179,32 @@ module Fastlane
162
179
  env_name: "APPCENTER_CODEPUSH_USE_LOCAL_APPCENTER_CLI",
163
180
  optional: true,
164
181
  default_value: false,
165
- description: "When true, the appcenter cli installed in the project directory is used"),
182
+ description: "When true, the appcenter cli installed in the project directory is used"),
183
+ FastlaneCore::ConfigItem.new(key: :plist_file,
184
+ type: String,
185
+ env_name: "APPCENTER_CODEPUSH_PLIST_FILE",
186
+ optional: true,
187
+ description: "Path to the Info.plist"),
188
+ FastlaneCore::ConfigItem.new(key: :xcode_project_file,
189
+ type: String,
190
+ env_name: "APPCENTER_CODEPUSH_XCODE_PROJECT_FILE",
191
+ optional: true,
192
+ description: "Path to the .pbxproj file"),
166
193
  FastlaneCore::ConfigItem.new(key: :private_key_path,
167
194
  type: String,
168
195
  env_name: "APPCENTER_CODEPUSH_PRIVATE_KEY_PATH",
169
196
  optional: true,
170
- description: "Path to private key that will be used for signing bundles")
197
+ description: "Path to private key that will be used for signing bundles"),
198
+ FastlaneCore::ConfigItem.new(key: :use_hermes,
199
+ type: Boolean,
200
+ env_name: "APPCENTER_CODEPUSH_USE_HERMES",
201
+ optional: true,
202
+ description: "Enable hermes and bypass automatic checks"),
203
+ FastlaneCore::ConfigItem.new(key: :extra_bundler_options,
204
+ type: Array,
205
+ env_name: "APPCENTER_CODEPUSH_EXTRA_BUNDLER_OPTIONS",
206
+ optional: true,
207
+ description: "Options that get passed to the react-native bundler"),
171
208
  ]
172
209
  end
173
210
 
@@ -9,6 +9,7 @@ module Fastlane
9
9
  APPCENTER_OWNER_NAME = :APPCENTER_OWNER_NAME
10
10
  APPCENTER_APP_NAME = :APPCENTER_APP_NAME
11
11
  APPCENTER_DISTRIBUTE_DESTINATIONS = :APPCENTER_DISTRIBUTE_DESTINATIONS
12
+ APPCENTER_DISTRIBUTE_DESTINATION_IDS = :APPCENTER_DISTRIBUTE_DESTINATION_IDS
12
13
  end
13
14
 
14
15
  class AppcenterFetchDevicesAction < Action
@@ -133,6 +133,7 @@ module Fastlane
133
133
  owner_type = params[:owner_type]
134
134
  app_name = params[:app_name]
135
135
  destinations = params[:destinations]
136
+ destination_ids = params[:destination_ids]
136
137
  destination_type = params[:destination_type]
137
138
  mandatory_update = params[:mandatory_update]
138
139
  notify_testers = params[:notify_testers]
@@ -172,6 +173,7 @@ module Fastlane
172
173
  else
173
174
  self.optional_error("Can't distribute #{file_ext} to stores, please use `destination_type: 'group'`") unless Constants::STORE_SUPPORTED_EXTENSIONS.include? file_ext
174
175
  UI.user_error!("The combination of `destinations: '*'` and `destination_type: 'store'` is invalid, please use `destination_type: 'group'` or explicitly specify the destinations") if destinations == "*"
176
+ UI.user_error!("The combination of `destination_ids` and `destination_type: 'store'` is invalid, please use `destination_type: 'group'` or use `destinations`") unless destination_ids.to_s.strip.empty?
175
177
  end
176
178
 
177
179
  release_upload_body = nil
@@ -248,7 +250,12 @@ module Fastlane
248
250
  else
249
251
  destinations_array = destinations.split(',').map(&:strip)
250
252
  end
251
-
253
+
254
+ destination_ids_array = []
255
+ unless destination_ids.to_s.empty?
256
+ destination_ids_array = destination_ids.split(',').map(&:strip)
257
+ end
258
+
252
259
  destinations_array.each do |destination_name|
253
260
  destination = Helper::AppcenterHelper.get_destination(api_token, owner_name, app_name, destination_type, destination_name)
254
261
  if destination
@@ -264,6 +271,17 @@ module Fastlane
264
271
  end
265
272
  end
266
273
 
274
+ unless destination_ids_array.empty?
275
+ destination_ids_array.each do |destination_id|
276
+ distributed_release = Helper::AppcenterHelper.add_to_destination(api_token, owner_name, app_name, release_id, destination_type, destination_id, mandatory_update, notify_testers)
277
+ if distributed_release
278
+ UI.success("Release '#{release_id}' (#{distributed_release['short_version']}) was successfully distributed to #{destination_type} \"#{destination_id}\"")
279
+ else
280
+ UI.error("Release '#{release_id}' was not found for destination '#{destination_id}'")
281
+ end
282
+ end
283
+ end
284
+
267
285
  safe_download_url = Helper::AppcenterHelper.get_install_url(owner_type, owner_name, app_name)
268
286
  UI.message("Release '#{release_id}' is available for download at: #{safe_download_url}")
269
287
  else
@@ -297,7 +315,7 @@ module Fastlane
297
315
  return true
298
316
  end
299
317
  rescue URI::InvalidURIError
300
- UI.user_error!("Provided app_name: '#{app_name}' is not in a valid format. Please ensure no special characters or spaces in the app_name.")
318
+ UI.user_error!("Provided owner_name: '#{owner_name}' or app_name: '#{app_name}' is not in a valid format. Please ensure no special characters or spaces.")
301
319
  return false
302
320
  end
303
321
 
@@ -327,6 +345,11 @@ module Fastlane
327
345
  app_name: params[:app_name]
328
346
  )
329
347
 
348
+ unless app_distribution_groups.is_a?(Array)
349
+ UI.error("Failed to fetch distribution groups for app #{params[:app_name]}.")
350
+ return
351
+ end
352
+
330
353
  group_names = app_distribution_groups.map { |g| g['name'] }
331
354
  destination_names = params[:destinations].split(',').map(&:strip)
332
355
 
@@ -577,6 +600,13 @@ module Fastlane
577
600
  optional: true,
578
601
  type: String),
579
602
 
603
+ FastlaneCore::ConfigItem.new(key: :destination_ids,
604
+ env_name: "APPCENTER_DISTRIBUTE_DESTINATION_IDS",
605
+ description: "Comma separated list of destination ids, use '00000000-0000-0000-0000-000000000000' for distributing to the Collaborators group. Only distribution groups are supported",
606
+ default_value: Actions.lane_context[SharedValues::APPCENTER_DISTRIBUTE_DESTINATION_IDS],
607
+ optional: true,
608
+ type: String),
609
+
580
610
  FastlaneCore::ConfigItem.new(key: :destination_type,
581
611
  env_name: "APPCENTER_DISTRIBUTE_DESTINATION_TYPE",
582
612
  description: "Destination type of distribution destination. 'group' and 'store' are supported",
@@ -696,6 +726,17 @@ module Fastlane
696
726
  release_notes: "release notes",
697
727
  notify_testers: false
698
728
  )',
729
+ 'appcenter_upload(
730
+ api_token: "...",
731
+ owner_name: "appcenter_owner",
732
+ app_name: "testing_ios_app",
733
+ file: "./app-release.ipa",
734
+ destination_ids: "00000000-0000-0000-0000-000000000000,12341234-1234-1234-1234-123412341234",
735
+ destination_type: "group",
736
+ dsym: "./app.dSYM.zip",
737
+ release_notes: "release notes",
738
+ notify_testers: false
739
+ )',
699
740
  'appcenter_upload(
700
741
  api_token: "...",
701
742
  owner_name: "appcenter_owner",
@@ -421,6 +421,7 @@ module Fastlane
421
421
  end
422
422
  end
423
423
  UI.message("Binary uploaded")
424
+ return true
424
425
  end
425
426
 
426
427
  # Commits or aborts the upload process for a release
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Appcenter
3
- VERSION = "2.1.0"
3
+ VERSION = "2.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-appcenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Microsoft Corporation
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-05 00:00:00.000000000 Z
11
+ date: 2024-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -156,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
156
  - !ruby/object:Gem::Version
157
157
  version: '0'
158
158
  requirements: []
159
- rubygems_version: 3.3.26
159
+ rubygems_version: 3.2.32
160
160
  signing_key:
161
161
  specification_version: 4
162
162
  summary: Fastlane plugin for App Center