fastlane-plugin-goodify_info_plist 0.1.6 → 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 +0 -2
- data/lib/fastlane/plugin/goodify_info_plist/actions/goodify_info_plist_action.rb +13 -6
- data/lib/fastlane/plugin/goodify_info_plist/helper/version_helper.rb +47 -0
- data/lib/fastlane/plugin/goodify_info_plist/version.rb +1 -1
- metadata +38 -23
- data/lib/fastlane/plugin/goodify_info_plist/helper/goodify_info_plist_helper.rb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc3c2b586d994a83b8c75ccb8c5a02baf56e9a82
|
4
|
+
data.tar.gz: ca7d6a21ae163096f626305ba62bbe30148f80e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1107bf6dca2acc72dc30d0f291e629e3fb84ea8efc39df6a2886fed257578698fe370dc002682741e2cd2e94c7e91b101b7a341dbc610757c319769a508e4b2f
|
7
|
+
data.tar.gz: d96639e5cab2b73176f153d0e0dd2fdd53f0e04080d9dabba79543c5f78261fb5c712b757faba319d412f6e2e29f849ca383fb271a48e202907e55a015f10efe
|
data/README.md
CHANGED
@@ -18,8 +18,6 @@ This plugin will update the plist so that the built application can be deployed
|
|
18
18
|
|
19
19
|
Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
|
20
20
|
|
21
|
-
**Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
|
22
|
-
|
23
21
|
## Run tests for this plugin
|
24
22
|
|
25
23
|
To run both the tests, and code style validation, run
|
@@ -1,4 +1,6 @@
|
|
1
1
|
require 'plist'
|
2
|
+
require 'fastlane/plugin/check_good_version'
|
3
|
+
|
2
4
|
module Fastlane
|
3
5
|
module Actions
|
4
6
|
class GoodifyInfoPlistAction < Action
|
@@ -18,12 +20,17 @@ module Fastlane
|
|
18
20
|
|
19
21
|
# create a set of url schemes for GD based on app id
|
20
22
|
app_id = plist["CFBundleIdentifier"]
|
21
|
-
url_schemes = [
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
url_schemes = []
|
24
|
+
good_sdk_version = Helper::GoodifyInfoPlistVersionHelper.new(other_action.check_good_version)
|
25
|
+
if good_sdk_version.major_version < 3
|
26
|
+
sc_url_schemes = [
|
27
|
+
"#{app_id}.sc",
|
28
|
+
"#{app_id}.sc2",
|
29
|
+
"#{app_id}.sc2.1.0.0.0"
|
30
|
+
]
|
31
|
+
url_schemes.push(*sc_url_schemes)
|
32
|
+
end
|
33
|
+
url_schemes.push("com.good.gd.discovery")
|
27
34
|
if params.values.fetch(:export_method, "app-store").casecmp("enterprise").zero?
|
28
35
|
url_schemes.push("com.good.gd.discovery.enterprise")
|
29
36
|
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module Fastlane
|
2
|
+
module Helper
|
3
|
+
class GoodifyInfoPlistVersionHelper
|
4
|
+
include Comparable
|
5
|
+
|
6
|
+
attr_accessor :major_version
|
7
|
+
|
8
|
+
attr_accessor :minor_version
|
9
|
+
|
10
|
+
attr_accessor :patch_version
|
11
|
+
|
12
|
+
attr_accessor :build_number
|
13
|
+
|
14
|
+
def initialize(version_string)
|
15
|
+
match = /^(?<major_version>\d+)\.(?<minor_version>\d+)\.(?<patch_version>\d+)\.(?<build_number>\d+)$/.match(version_string) || {}
|
16
|
+
|
17
|
+
@major_version = (match[:major_version] || '0').to_i
|
18
|
+
@minor_version = (match[:minor_version] || '0').to_i
|
19
|
+
@patch_version = (match[:patch_version] || '0').to_i
|
20
|
+
@build_number = (match[:build_number] || '0').to_i
|
21
|
+
end
|
22
|
+
|
23
|
+
def to_s
|
24
|
+
"#{@major_version}.#{@minor_version}.#{@patch_version}.#{@build_number}"
|
25
|
+
end
|
26
|
+
|
27
|
+
def <=>(other)
|
28
|
+
major_version_comparison = self.major_version <=> other.major_version
|
29
|
+
minor_version_comparison = self.minor_version <=> other.minor_version
|
30
|
+
patch_version_comparison = self.patch_version <=> other.patch_version
|
31
|
+
build_number_comparison = self.build_number <=> other.build_number
|
32
|
+
|
33
|
+
if !major_version_comparison.zero?
|
34
|
+
major_version_comparison
|
35
|
+
elsif !minor_version_comparison.zero?
|
36
|
+
minor_version_comparison
|
37
|
+
elsif !patch_version_comparison.zero?
|
38
|
+
patch_version_comparison
|
39
|
+
elsif !build_number_comparison.zero?
|
40
|
+
build_number_comparison
|
41
|
+
else
|
42
|
+
0
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
metadata
CHANGED
@@ -1,111 +1,125 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-goodify_info_plist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lyndsey Ferguson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: fastlane-plugin-check_good_version
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.4
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.1.4
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: pry
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
|
-
- -
|
31
|
+
- - ">="
|
18
32
|
- !ruby/object:Gem::Version
|
19
33
|
version: '0'
|
20
34
|
type: :development
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
|
-
- -
|
38
|
+
- - ">="
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
|
-
- -
|
45
|
+
- - ">="
|
32
46
|
- !ruby/object:Gem::Version
|
33
47
|
version: '0'
|
34
48
|
type: :development
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
|
-
- -
|
52
|
+
- - ">="
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rspec
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- -
|
59
|
+
- - ">="
|
46
60
|
- !ruby/object:Gem::Version
|
47
61
|
version: '0'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- -
|
66
|
+
- - ">="
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rake
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- -
|
73
|
+
- - ">="
|
60
74
|
- !ruby/object:Gem::Version
|
61
75
|
version: '0'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- -
|
80
|
+
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: rubocop
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- -
|
87
|
+
- - ">="
|
74
88
|
- !ruby/object:Gem::Version
|
75
89
|
version: '0'
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- -
|
94
|
+
- - ">="
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: fastlane
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- -
|
101
|
+
- - ">="
|
88
102
|
- !ruby/object:Gem::Version
|
89
103
|
version: 1.95.0
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- -
|
108
|
+
- - ">="
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: 1.95.0
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: plist
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
|
-
- -
|
115
|
+
- - ">="
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: '0'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
|
-
- -
|
122
|
+
- - ">="
|
109
123
|
- !ruby/object:Gem::Version
|
110
124
|
version: '0'
|
111
125
|
description:
|
@@ -114,12 +128,12 @@ executables: []
|
|
114
128
|
extensions: []
|
115
129
|
extra_rdoc_files: []
|
116
130
|
files:
|
131
|
+
- LICENSE
|
132
|
+
- README.md
|
133
|
+
- lib/fastlane/plugin/goodify_info_plist.rb
|
117
134
|
- lib/fastlane/plugin/goodify_info_plist/actions/goodify_info_plist_action.rb
|
118
|
-
- lib/fastlane/plugin/goodify_info_plist/helper/
|
135
|
+
- lib/fastlane/plugin/goodify_info_plist/helper/version_helper.rb
|
119
136
|
- lib/fastlane/plugin/goodify_info_plist/version.rb
|
120
|
-
- lib/fastlane/plugin/goodify_info_plist.rb
|
121
|
-
- README.md
|
122
|
-
- LICENSE
|
123
137
|
homepage: https://github.com/lyndsey-ferguson/fastlane_plugins
|
124
138
|
licenses:
|
125
139
|
- MIT
|
@@ -130,20 +144,21 @@ require_paths:
|
|
130
144
|
- lib
|
131
145
|
required_ruby_version: !ruby/object:Gem::Requirement
|
132
146
|
requirements:
|
133
|
-
- -
|
147
|
+
- - ">="
|
134
148
|
- !ruby/object:Gem::Version
|
135
149
|
version: '0'
|
136
150
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
137
151
|
requirements:
|
138
|
-
- -
|
152
|
+
- - ">="
|
139
153
|
- !ruby/object:Gem::Version
|
140
154
|
version: '0'
|
141
155
|
requirements: []
|
142
156
|
rubyforge_project:
|
143
|
-
rubygems_version: 2.
|
157
|
+
rubygems_version: 2.5.2
|
144
158
|
signing_key:
|
145
159
|
specification_version: 4
|
146
160
|
summary: This plugin will update the plist so that the built application can be deployed
|
147
161
|
and managed within BlackBerry's Good Dynamics Control Center for Enterprise Mobility
|
148
162
|
Management.
|
149
163
|
test_files: []
|
164
|
+
has_rdoc:
|
@@ -1,12 +0,0 @@
|
|
1
|
-
module Fastlane
|
2
|
-
module Helper
|
3
|
-
class GoodifyInfoPlistHelper
|
4
|
-
# class methods that you define here become available in your action
|
5
|
-
# as `Helper::GoodifyInfoPlistHelper.your_method`
|
6
|
-
#
|
7
|
-
def self.show_message
|
8
|
-
UI.message("Hello from the goodify_info_plist plugin helper!")
|
9
|
-
end
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|