fastlane-actions-xcode_get_product_name 0.2.1 → 0.2.2

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
  SHA1:
3
- metadata.gz: af0270a40bd207104e4b8db51d17e23f6d75b53e
4
- data.tar.gz: 8ab53e3b1c8e8241dbbf1f7a4f77962e67234cd0
3
+ metadata.gz: 3b2b6a5dda24a322ae675351d493c524b6f1e314
4
+ data.tar.gz: ede67927f2650a8e1fb120e6cdfa3fe4b2d2b622
5
5
  SHA512:
6
- metadata.gz: cfef4c7a826313bf4e14a5bad57beff3ed1a4a219dc7a3ea381c8e9eec59e61fdf81281ed4f8f67a7946a87ead6809865b7fd593f3c64e2f17c0dcb46d49997d
7
- data.tar.gz: d42cd48efe8ba54e3e960736a4e3d4c5e64b9b5d39d3a214888d008e3e12e6abf6000272a75442332cf12743144e89036b95c076f7aaa102022843d37dd259fe
6
+ metadata.gz: d309845c1ffa244b007248ad3c608a51677d9e0d9f9d6caf7cb8872753df6a3268d8517a13627acc3ac991cff86dc483485940396c897e327b4718eae6065f38
7
+ data.tar.gz: aa03c2af69fa6f215e16c3330924cd80f72863c8d1810703eda4315e70e44b1237b2ca50258b0e612462e951a94fa65242b31bfd8559fdff031a1551ca6d2d83
data/README.md CHANGED
@@ -63,7 +63,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
63
63
 
64
64
  ## Contributing
65
65
 
66
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/fastlane-actions-xcode_get_product_name. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
66
+ Bug reports and pull requests are welcome on GitHub at https://github.com/kassy-hub/fastlane-actions-xcode_get_product_name. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
67
67
 
68
68
 
69
69
  ## License
@@ -5,14 +5,25 @@ require "fastlane_core"
5
5
  module FastlaneCore
6
6
  # Represents an Xcode project
7
7
  class Project
8
- def xcodebuild_parameters
9
- proj = []
10
- proj << "-workspace '#{options[:workspace]}'" if options[:workspace]
11
- proj << "-scheme '#{options[:scheme]}'" if options[:scheme]
12
- proj << "-project '#{options[:project]}'" if options[:project]
13
- proj << "-configuration '#{options[:configuration]}'" if options[:configuration]
14
-
15
- return proj
8
+ def build_settings(key: nil, optional: true)
9
+ unless @build_settings
10
+ # We also need to pass the workspace and scheme to this command
11
+ command = "xcrun xcodebuild -showBuildSettings #{xcodebuild_parameters.join(' ')}"
12
+ command += " -configuration '#{options[:configuration]}'" if options[:configuration]
13
+ @build_settings = Helper.backticks(command, print: false)
14
+ end
15
+
16
+ begin
17
+ result = @build_settings.split("\n").find { |c| c.split(" = ").first.strip == key }
18
+ return result.split(" = ").last
19
+ rescue => ex
20
+ return nil if optional # an optional value, we really don't care if something goes wrong
21
+
22
+ Helper.log.error caller.join("\n\t")
23
+ Helper.log.error "Could not fetch #{key} from project file: #{ex}"
24
+ end
25
+
26
+ nil
16
27
  end
17
28
  end
18
29
  end
@@ -1,7 +1,7 @@
1
1
  module Fastlane
2
2
  module Actions
3
3
  module XcodeGetProductName
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-actions-xcode_get_product_name
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masahiro Kashima
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-09 00:00:00.000000000 Z
11
+ date: 2016-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler