fastlane-actions-xcode_get_product_name 0.1.1 → 0.2.0
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 +4 -4
- data/README.md +35 -4
- data/lib/fastlane/actions/xcode_get_product_name/version.rb +1 -1
- data/lib/fastlane/actions/xcode_get_product_name.rb +21 -20
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d94941fa989fdacf78fd8a3b8314bc81adf2acc2
|
4
|
+
data.tar.gz: 35bd5298c5cec3a9be40c8774f2d2f9585de92c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8dd44f4bf768e38b335bbe08220c2e9005dcae2ec83789e30dca2a75e54c615d5c89bef045307398edad191e7bc1039de80a7cf9f760f8b9cd323aa7ecd4f690
|
7
|
+
data.tar.gz: bb92596e32288109c1d28992c1c800588ae1969874d3155d12cf191e78e192cf300207a78c96e689f7f9a71f807a37c311111dbc9ae203b6681fb43566641db2
|
data/README.md
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# Fastlane::Actions::XcodeGetProductName
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
This is a [fastlane](https://github.com/fastlane/fastlane)-action which helps to get product name from Xcode project. You can designate scheme, target and build-configuration.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
7
|
+
Make sure that [fastlane](https://github.com/fastlane/fastlane) is installed.
|
8
|
+
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
11
|
```ruby
|
@@ -22,7 +22,38 @@ Or install it yourself as:
|
|
22
22
|
|
23
23
|
## Usage
|
24
24
|
|
25
|
-
|
25
|
+
In your lane:
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
appName = xcode_get_product_name(
|
29
|
+
scheme: 'Dev',
|
30
|
+
configuration: 'Debug',
|
31
|
+
)
|
32
|
+
```
|
33
|
+
|
34
|
+
and you can get product name in `appName`.
|
35
|
+
|
36
|
+
e.g. In your Fastfile:
|
37
|
+
|
38
|
+
```ruby
|
39
|
+
lane :build do |options|
|
40
|
+
version = get_build_number
|
41
|
+
scheme = options[:scheme] || 'Dev'
|
42
|
+
config = options[:config] || 'Debug'
|
43
|
+
directory = 'build/'
|
44
|
+
appName = xcode_get_product_name(
|
45
|
+
target: scheme,
|
46
|
+
configuration: config,
|
47
|
+
)
|
48
|
+
ipaName = "#{appName}##{version}(#{scheme}, #{config}).ipa"
|
49
|
+
gym(
|
50
|
+
scheme: scheme,
|
51
|
+
configuration: config,
|
52
|
+
output_directory: directory,
|
53
|
+
output_name: ipaName,
|
54
|
+
)
|
55
|
+
end
|
56
|
+
```
|
26
57
|
|
27
58
|
## Development
|
28
59
|
|
@@ -1,4 +1,6 @@
|
|
1
1
|
require "fastlane/actions/xcode_get_product_name/version"
|
2
|
+
require "gym"
|
3
|
+
require "fastlane_core"
|
2
4
|
|
3
5
|
module Fastlane
|
4
6
|
module Actions
|
@@ -17,27 +19,20 @@ module Fastlane
|
|
17
19
|
# fastlane will take care of reading in the parameter and fetching the environment variable:
|
18
20
|
# Helper.log.info "Parameter API Token: #{params[:api_token]}"
|
19
21
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
xcproj.targets.each { |target|
|
28
|
-
if target.name == tgt
|
29
|
-
target.build_configuration_list.build_configurations.each { |configuration|
|
30
|
-
if configuration.name == cfg
|
31
|
-
result = configuration.build_settings['PRODUCT_NAME']
|
32
|
-
if result.include?('TARGET_NAME')
|
33
|
-
result = target.name
|
34
|
-
end
|
35
|
-
end
|
36
|
-
}
|
37
|
-
end
|
22
|
+
if params[:target]
|
23
|
+
params[:scheme] = params[:target]
|
24
|
+
end
|
25
|
+
|
26
|
+
o = Gym::Options.available_options + available_options
|
27
|
+
o = o.uniq { |op|
|
28
|
+
op.key
|
38
29
|
}
|
39
|
-
|
40
|
-
|
30
|
+
config = FastlaneCore::Configuration.create(o, params.values)
|
31
|
+
FastlaneCore::Project.detect_projects(config)
|
32
|
+
project = FastlaneCore::Project.new(config)
|
33
|
+
result = project.default_app_name.to_s
|
34
|
+
|
35
|
+
if result.length > 0
|
41
36
|
Helper.log.info "PRODUCT_NAME #{result} found!".green
|
42
37
|
else
|
43
38
|
Helper.log.info "PRODUCT_NAME not found".red
|
@@ -71,9 +66,15 @@ module Fastlane
|
|
71
66
|
[
|
72
67
|
FastlaneCore::ConfigItem.new(key: :target,
|
73
68
|
is_string: true,
|
69
|
+
optional: true,
|
70
|
+
),
|
71
|
+
FastlaneCore::ConfigItem.new(key: :scheme,
|
72
|
+
is_string: true,
|
73
|
+
optional: true,
|
74
74
|
),
|
75
75
|
FastlaneCore::ConfigItem.new(key: :configuration,
|
76
76
|
is_string: true,
|
77
|
+
optional: true,
|
77
78
|
),
|
78
79
|
]
|
79
80
|
end
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
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.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masahiro Kashima
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.10'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.10'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
41
|
description: Fastlane action that helps getting your xcode's product name
|
@@ -45,8 +45,8 @@ executables: []
|
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
|
-
- .gitignore
|
49
|
-
- .travis.yml
|
48
|
+
- ".gitignore"
|
49
|
+
- ".travis.yml"
|
50
50
|
- CODE_OF_CONDUCT.md
|
51
51
|
- Gemfile
|
52
52
|
- LICENSE.txt
|
@@ -67,17 +67,17 @@ require_paths:
|
|
67
67
|
- lib
|
68
68
|
required_ruby_version: !ruby/object:Gem::Requirement
|
69
69
|
requirements:
|
70
|
-
- -
|
70
|
+
- - ">="
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '0'
|
73
73
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
|
-
- -
|
75
|
+
- - ">="
|
76
76
|
- !ruby/object:Gem::Version
|
77
77
|
version: '0'
|
78
78
|
requirements: []
|
79
79
|
rubyforge_project:
|
80
|
-
rubygems_version: 2.4.
|
80
|
+
rubygems_version: 2.4.5.1
|
81
81
|
signing_key:
|
82
82
|
specification_version: 4
|
83
83
|
summary: Fastlane action
|