fastlane-plugin-appcenter 2.1.1 → 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: 404a5a724bd71f78a4e18b16208fb960f4d1c6bdc30eeba699158b811fd86d09
4
- data.tar.gz: aa973dd28335221712ee40159b7133cf10e4e865b95f87a3d0d96057d4dbc924
3
+ metadata.gz: f608638152db3997ce1692db80d1feb26887237a481b9563beb55c82fe3489b9
4
+ data.tar.gz: 2c80e7cd95399e66ffd4360e5bbef035ade40e63e83634faf3cfc5f684d55924
5
5
  SHA512:
6
- metadata.gz: 4686223db2d015a7de084dda5e87012374f788f280d98fdfd977e99b664388bbf38b256418b7a0f1fb6cefadec8133b221b01510fa6ada6bae6ac859cd778127
7
- data.tar.gz: 133e589903a76545c852bc1c18b7ce51664882edce0f2d8bbb3048bac51af764280a7a0124947878f63df525063ed39e87e9b4e542bc63e68092e12c6a89dbe4
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
 
@@ -33,11 +33,12 @@ module Fastlane
33
33
  plist_file = params[:plist_file]
34
34
  xcode_project_file = params[:xcode_project_file]
35
35
  use_hermes = params[:use_hermes]
36
+ extra_bundler_options = params[:extra_bundler_options]
36
37
 
37
38
  base_executable = "appcenter "
38
39
 
39
40
  if use_local_appcenter_cli
40
- base_executable = "npm exec " + base_executable
41
+ base_executable = "npm exec -- " + base_executable
41
42
  end
42
43
 
43
44
  command = base_executable + "codepush release-react --token #{token} --app #{owner}/#{app} --deployment-name #{deployment} --development #{dev} "
@@ -78,6 +79,10 @@ module Fastlane
78
79
  unless use_hermes.nil?
79
80
  command += "--use-hermes #{use_hermes} "
80
81
  end
82
+ if extra_bundler_options
83
+ command += extra_bundler_options.map { |option| "--extra-bundler-option='#{option}' " }.join
84
+ end
85
+
81
86
  if dry_run
82
87
  UI.message("Dry run!".red + " Would have run: " + command + "\n")
83
88
  else
@@ -174,17 +179,17 @@ module Fastlane
174
179
  env_name: "APPCENTER_CODEPUSH_USE_LOCAL_APPCENTER_CLI",
175
180
  optional: true,
176
181
  default_value: false,
177
- 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"),
178
183
  FastlaneCore::ConfigItem.new(key: :plist_file,
179
184
  type: String,
180
185
  env_name: "APPCENTER_CODEPUSH_PLIST_FILE",
181
186
  optional: true,
182
- description: "Path to the Info.plist"),
187
+ description: "Path to the Info.plist"),
183
188
  FastlaneCore::ConfigItem.new(key: :xcode_project_file,
184
189
  type: String,
185
190
  env_name: "APPCENTER_CODEPUSH_XCODE_PROJECT_FILE",
186
191
  optional: true,
187
- description: "Path to the .pbxproj file"),
192
+ description: "Path to the .pbxproj file"),
188
193
  FastlaneCore::ConfigItem.new(key: :private_key_path,
189
194
  type: String,
190
195
  env_name: "APPCENTER_CODEPUSH_PRIVATE_KEY_PATH",
@@ -194,7 +199,12 @@ module Fastlane
194
199
  type: Boolean,
195
200
  env_name: "APPCENTER_CODEPUSH_USE_HERMES",
196
201
  optional: true,
197
- description: "Enable hermes and bypass automatic checks")
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"),
198
208
  ]
199
209
  end
200
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
@@ -582,6 +600,13 @@ module Fastlane
582
600
  optional: true,
583
601
  type: String),
584
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
+
585
610
  FastlaneCore::ConfigItem.new(key: :destination_type,
586
611
  env_name: "APPCENTER_DISTRIBUTE_DESTINATION_TYPE",
587
612
  description: "Destination type of distribution destination. 'group' and 'store' are supported",
@@ -701,6 +726,17 @@ module Fastlane
701
726
  release_notes: "release notes",
702
727
  notify_testers: false
703
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
+ )',
704
740
  'appcenter_upload(
705
741
  api_token: "...",
706
742
  owner_name: "appcenter_owner",
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Appcenter
3
- VERSION = "2.1.1"
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.1
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-09-14 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