fastlane-plugin-versioning 0.4.0 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/fastlane/plugin/versioning/actions/ci_build_number.rb +3 -3
- data/lib/fastlane/plugin/versioning/actions/get_build_number_from_xcodeproj.rb +1 -1
- data/lib/fastlane/plugin/versioning/actions/get_version_number_from_xcodeproj.rb +1 -1
- data/lib/fastlane/plugin/versioning/actions/increment_build_number_in_xcodeproj.rb +12 -7
- data/lib/fastlane/plugin/versioning/actions/increment_version_number_in_xcodeproj.rb +14 -10
- data/lib/fastlane/plugin/versioning/version.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b702f4098465814793901e44ceeb26fc25065051ad0eadfbb60500129210b43f
|
4
|
+
data.tar.gz: d43d02bd7b29f9d4cfc90f024831427ba997300520ccaada886943289e393710
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b705c684f255b4e7fcd7f93005772b33c9226881eda1a17b4837aa6da30fa4cc04b414b42044c47a21a342e2f970b5493344f016c0fcbc51f0796a40f124c1b0
|
7
|
+
data.tar.gz: 9d1ce19055ce84510a73be5aa01c50adf0e391807703dfb4ed923a29300db196d079d2bf66aff4475d9d074b4fb445db9d1b522a241c41859eb2c0f2b9c760d2
|
data/README.md
CHANGED
@@ -158,7 +158,7 @@ version = get_build_number_from_plist(xcodeproj: "Project.xcodeproj", # optional
|
|
158
158
|
|
159
159
|
### get_build_number_from_xcodeproj
|
160
160
|
|
161
|
-
Get the build number from a xcodeproj - specific to a target. Doesn't use agvtool (unlike default `get_build_number`).
|
161
|
+
Get the build number from a xcodeproj - specific to a target. Doesn't use `agvtool` (unlike default `get_build_number`).
|
162
162
|
|
163
163
|
```ruby
|
164
164
|
version = get_build_number_from_xcodeproj(xcodeproj: "Project.xcodeproj", # optional
|
@@ -168,7 +168,7 @@ version = get_build_number_from_xcodeproj(xcodeproj: "Project.xcodeproj", # opti
|
|
168
168
|
|
169
169
|
### get_version_number_from_xcodeproj
|
170
170
|
|
171
|
-
Get the version number from a xcodeproj - specific to a target. Doesn't use agvtool (unlike default `get_build_number`).
|
171
|
+
Get the version number from a xcodeproj - specific to a target. Doesn't use `agvtool` (unlike default `get_build_number`).
|
172
172
|
|
173
173
|
```ruby
|
174
174
|
version = get_version_number_from_xcodeproj(xcodeproj: 'Project.xcodeproj', # optional
|
@@ -27,7 +27,7 @@ module Fastlane
|
|
27
27
|
end
|
28
28
|
|
29
29
|
if ENV.key?('GITLAB_CI')
|
30
|
-
return ENV['CI_JOB_ID']
|
30
|
+
return ENV['CI_PIPELINE_IID'] || ENV['CI_JOB_ID']
|
31
31
|
end
|
32
32
|
|
33
33
|
if ENV.key?('XCS')
|
@@ -50,7 +50,7 @@ module Fastlane
|
|
50
50
|
return ENV['APPVEYOR_BUILD_NUMBER']
|
51
51
|
end
|
52
52
|
|
53
|
-
UI.error("Cannot detect current CI build number.
|
53
|
+
UI.error("Cannot detect current CI build number. Defaulting to \"1\".")
|
54
54
|
"1"
|
55
55
|
end
|
56
56
|
|
@@ -63,7 +63,7 @@ module Fastlane
|
|
63
63
|
end
|
64
64
|
|
65
65
|
def self.authors
|
66
|
-
["Siarhei Fedartsou"]
|
66
|
+
["Siarhei Fedartsou", "John Douglas"]
|
67
67
|
end
|
68
68
|
|
69
69
|
def self.example_code
|
@@ -57,7 +57,7 @@ module Fastlane
|
|
57
57
|
|
58
58
|
if !(build_configuration_name = params[:build_configuration_name]).nil?
|
59
59
|
build_number = build_number[build_configuration_name]
|
60
|
-
UI.user_error! "Cannot resolve $(CURRENT_PROJECT_VERSION) build setting for #{build_configuration_name}." if
|
60
|
+
UI.user_error! "Cannot resolve $(CURRENT_PROJECT_VERSION) build setting for #{build_configuration_name}." if build_number.nil?
|
61
61
|
else
|
62
62
|
build_number = build_number.values.compact.uniq
|
63
63
|
UI.user_error! 'Cannot accurately resolve $(CURRENT_PROJECT_VERSION) build setting, try specifying :build_configuration_name.' if build_number.count > 1
|
@@ -41,7 +41,7 @@ module Fastlane
|
|
41
41
|
|
42
42
|
if !(build_configuration_name = params[:build_configuration_name]).nil?
|
43
43
|
version_number = version_number[build_configuration_name]
|
44
|
-
UI.user_error! "Cannot resolve $(MARKETING_VERSION) build setting for #{build_configuration_name}." if
|
44
|
+
UI.user_error! "Cannot resolve $(MARKETING_VERSION) build setting for #{build_configuration_name}." if version_number.nil?
|
45
45
|
else
|
46
46
|
version_number = version_number.values.compact.uniq
|
47
47
|
UI.user_error! 'Cannot accurately resolve $(MARKETING_VERSION) build setting, try specifying :build_configuration_name.' if version_number.count > 1
|
@@ -59,16 +59,21 @@ module Fastlane
|
|
59
59
|
target = project.targets[0] if target.nil?
|
60
60
|
end
|
61
61
|
|
62
|
-
|
62
|
+
target.build_configurations.each do |config|
|
63
|
+
UI.message "updating #{config.name} to build #{next_build_number}"
|
64
|
+
config.build_settings["CURRENT_PROJECT_VERSION"] = next_build_number
|
65
|
+
end unless target.nil?
|
66
|
+
|
63
67
|
project.save
|
64
68
|
end
|
65
69
|
|
66
70
|
def self.set_build_number_using_scheme(params, next_build_number)
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
71
|
+
project = Xcodeproj::Project.open(params[:xcodeproj])
|
72
|
+
configs = project.objects.select { |obj| select_build_configuration_predicate(params[:build_configuration_name], obj) }
|
73
|
+
configs.each do |config|
|
74
|
+
config.build_settings["CURRENT_PROJECT_VERSION"] = next_build_number
|
75
|
+
end
|
76
|
+
|
72
77
|
project.save
|
73
78
|
end
|
74
79
|
|
@@ -111,7 +116,7 @@ module Fastlane
|
|
111
116
|
end
|
112
117
|
|
113
118
|
def self.authors
|
114
|
-
["jdouglas-nz"]
|
119
|
+
["jdouglas-nz", "neilb01"]
|
115
120
|
end
|
116
121
|
|
117
122
|
def self.is_supported?(platform)
|
@@ -66,7 +66,7 @@ module Fastlane
|
|
66
66
|
return is_build_valid_configuration
|
67
67
|
end
|
68
68
|
|
69
|
-
def self.
|
69
|
+
def self.set_version_number_using_target(params, next_version_number)
|
70
70
|
project = Xcodeproj::Project.open(params[:xcodeproj])
|
71
71
|
if params[:target]
|
72
72
|
target = project.targets.detect { |t| t.name == params[:target] }
|
@@ -79,17 +79,21 @@ module Fastlane
|
|
79
79
|
target = project.targets[0] if target.nil?
|
80
80
|
end
|
81
81
|
|
82
|
-
|
82
|
+
target.build_configurations.each do |config|
|
83
|
+
UI.message "updating #{config.name} to version #{next_version_number}"
|
84
|
+
config.build_settings["MARKETING_VERSION"] = next_version_number
|
85
|
+
end unless target.nil?
|
86
|
+
|
83
87
|
project.save
|
84
88
|
end
|
85
89
|
|
86
|
-
def self.
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
90
|
+
def self.set_version_number_using_scheme(params, next_version_number)
|
91
|
+
project = Xcodeproj::Project.open(params[:xcodeproj])
|
92
|
+
configs = project.objects.select { |obj| select_build_configuration_predicate(params[:build_configuration_name], obj) }
|
93
|
+
configs.each do |config|
|
94
|
+
config.build_settings["MARKETING_VERSION"] = next_version_number
|
95
|
+
end
|
96
|
+
project.save
|
93
97
|
end
|
94
98
|
|
95
99
|
#####################################################
|
@@ -163,7 +167,7 @@ module Fastlane
|
|
163
167
|
end
|
164
168
|
|
165
169
|
def self.authors
|
166
|
-
["jdouglas-nz"]
|
170
|
+
["jdouglas-nz", "neilb01"]
|
167
171
|
end
|
168
172
|
|
169
173
|
def self.is_supported?(platform)
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-versioning
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Siarhei Fiedartsou
|
8
|
+
- John Douglas
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2021-07-11 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: pry
|
@@ -67,7 +68,9 @@ dependencies:
|
|
67
68
|
- !ruby/object:Gem::Version
|
68
69
|
version: 1.93.1
|
69
70
|
description:
|
70
|
-
email:
|
71
|
+
email:
|
72
|
+
- siarhei.fedartsou@gmail.com
|
73
|
+
- john.douglas.nz@gmail.com
|
71
74
|
executables: []
|
72
75
|
extensions: []
|
73
76
|
extra_rdoc_files: []
|
@@ -107,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
110
|
- !ruby/object:Gem::Version
|
108
111
|
version: '0'
|
109
112
|
requirements: []
|
110
|
-
rubygems_version: 3.0.
|
113
|
+
rubygems_version: 3.0.6
|
111
114
|
signing_key:
|
112
115
|
specification_version: 4
|
113
116
|
summary: Allows to set/get app version and build number directly to/from Info.plist
|