fastlane-plugin-get_product_bundle_id 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dca2632f38f39debc967aaaaa0cdb27e046a84b9540839b60f7814f353a8bd56
4
- data.tar.gz: 5dbb17053dba865a1137bf8bf0e50f08b45b6b274afb63f7e25c09dc977df1d4
3
+ metadata.gz: 0b40500c4dbc56469ff2fce07e7a80db313d2d3298a6cb1338845b92a2fe2641
4
+ data.tar.gz: c02802d216090c9457dc091dc6cbcb6f36a3fb28b0c44fa48c4cabd71e23c977
5
5
  SHA512:
6
- metadata.gz: bdf658403aec57899556e26053c4018ba698dd40c72146ddce9bdc47f0320ddd6fe8bb58d3449135b1a5c50a2911b7f46a7d9e41093ea6f51ddf423d676d7010
7
- data.tar.gz: 875ddcc966a322154272f0e9147de2c6d4c23b27651e978bb816b0a4fbda2b18a36ddc58a562b90ed49ef9b1822c1eb0f7156a612f7a4065d5aebb48827dc84e
6
+ metadata.gz: 18302b1bab3e7d02c3d88bb67e4fd2cc9aaccc45eb22b8f08dab8b2e0e9a8dd7d76043cd626e182a048912f560f459b568042ef2dc516d16b99490c43e993472
7
+ data.tar.gz: 4a0e54d51e803b50f0401a0f1fc573e25ba2e3fe2024235e4e0c68a9825020e599823a2822b50c0aebd8ff6f1bf1e3f31b40eefc77c29935e70d183ea97c664f
@@ -11,13 +11,13 @@ module Fastlane
11
11
  project = Xcodeproj::Project.open(projectpath)
12
12
  targets = project.targets.find_all { |t| target_uuids.include?(t.uuid) }
13
13
  if params[:target].nil?
14
- build_configuration = targets.first.build_configurations.first
14
+ build_configuration = xcbuildconfiguration(targets.first, params[:build_configuration])
15
15
  else
16
16
  target = targets.find { |t| t.name == params[:target] }
17
17
 
18
18
  UI.user_error!("Target '#{params[:target]}' does not exist in the given scheme") if target.nil?
19
19
 
20
- build_configuration = target.build_configurations.first
20
+ build_configuration = xcbuildconfiguration(target, params[:build_configuration])
21
21
  end
22
22
  build_configuration.build_settings['PRODUCT_BUNDLE_IDENTIFIER']
23
23
  end
@@ -35,6 +35,19 @@ module Fastlane
35
35
  Xcodeproj::XCScheme.new(scheme_path)
36
36
  end
37
37
 
38
+ def self.xcbuildconfiguration(target, build_configuration_name)
39
+ if build_configuration_name.nil?
40
+ configuration = target.build_configurations.first
41
+
42
+ UI.message("No configuration specified, taking first: '#{configuration.name}'")
43
+ else
44
+ configuration = target.build_configurations.find { |c| c.name == build_configuration_name }
45
+
46
+ UI.user_error!("Build configuration '#{build_configuration_name}' does not exist in target '#{target.name}'") if configuration.nil?
47
+ end
48
+ configuration
49
+ end
50
+
38
51
  def self.description
39
52
  "Gets PRODUCT_BUNDLE_IDENTIFIER from a buildable target in an Xcode project using a provided scheme"
40
53
  end
@@ -73,6 +86,11 @@ module Fastlane
73
86
  FastlaneCore::ConfigItem.new(key: :target,
74
87
  env_name: "GET_PRODUCT_BUNDLE_ID_TARGET",
75
88
  description: "The name of the target from which to get the PRODUCT_BUNDLE_IDENTIFIER from. If not given, defaults to the first buildable target",
89
+ optional: true,
90
+ type: String),
91
+ FastlaneCore::ConfigItem.new(key: :build_configuration,
92
+ env_name: "GET_PRODUCT_BUNDLE_ID_BUILD_CONFIGURATION",
93
+ description: "The name of the build configuration to use. If not given, defaults to the first build configuration",
76
94
  optional: true,
77
95
  type: String)
78
96
  ]
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module GetProductBundleId
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-get_product_bundle_id
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lyndsey Ferguson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-11 00:00:00.000000000 Z
11
+ date: 2019-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xcodeproj
@@ -153,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
153
  - !ruby/object:Gem::Version
154
154
  version: '0'
155
155
  requirements: []
156
- rubygems_version: 3.0.2
156
+ rubygems_version: 3.0.6
157
157
  signing_key:
158
158
  specification_version: 4
159
159
  summary: Gets PRODUCT_BUNDLE_IDENTIFIER from the first buildable target in a given