fastlane-plugin-versioning 0.4.6 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +42 -5
- data/lib/fastlane/plugin/versioning/actions/ci_build_number.rb +4 -0
- data/lib/fastlane/plugin/versioning/actions/get_app_store_version_number.rb +10 -2
- data/lib/fastlane/plugin/versioning/actions/increment_version_number_in_plist.rb +4 -0
- data/lib/fastlane/plugin/versioning/actions/increment_version_number_in_xcodeproj.rb +4 -0
- data/lib/fastlane/plugin/versioning/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03aeb9f6626333091028495754b989bfa694844515ba302e4d0b35b19a87fd0a
|
4
|
+
data.tar.gz: d3bede186bf5e768f804b7ef557c02015b56d17e532bd1a89d042e9439287eb0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: caa6ec62dbab21b2e4c304b287798ba0b75040ba7ea443429484b34bb3420d395cd38349139f6f7139931abc33304a6c5d9a4aa1730c8c280aad8ee4503f9c60
|
7
|
+
data.tar.gz: 1d885526fe58a4930b1d37f9ade376cce2dac25445a00a3b645389cb17d20825521d10da2e1df49692e93999746755bcb77e62d7d7f3275c4c152a40c4ba89db
|
data/README.md
CHANGED
@@ -57,6 +57,13 @@ increment_version_number_in_plist(
|
|
57
57
|
# Automatically increment patch version number. Use App Store version number as a source.
|
58
58
|
version_source: 'appstore'
|
59
59
|
)
|
60
|
+
increment_version_number_in_plist(
|
61
|
+
# Automatically increment patch version number. Use App Store version number as a source.
|
62
|
+
version_source: 'appstore',
|
63
|
+
# optional two letter country code:
|
64
|
+
# specify if availability of your app is limited to a certain country
|
65
|
+
country: 'at'
|
66
|
+
)
|
60
67
|
|
61
68
|
increment_version_number_in_plist(
|
62
69
|
# specify specific version number (optional, omitting it increments patch version number)
|
@@ -108,13 +115,28 @@ version = get_version_number_from_plist(xcodeproj: 'Project.xcodeproj', # option
|
|
108
115
|
|
109
116
|
```ruby
|
110
117
|
version = get_app_store_version_number(xcodeproj: 'Project.xcodeproj', # optional
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
118
|
+
target: 'TestTarget', # optional, or `scheme`
|
119
|
+
# optional, must be specified if you have different Info.plist build settings
|
120
|
+
# for different build configurations
|
121
|
+
build_configuration_name: 'Release')
|
122
|
+
|
123
|
+
version = get_app_store_version_number(xcodeproj: 'Project.xcodeproj', # optional
|
124
|
+
target: 'TestTarget', # optional, or `scheme`
|
125
|
+
# optional, must be specified if you have different Info.plist build settings
|
126
|
+
# for different build configurations
|
127
|
+
build_configuration_name: 'Release',
|
128
|
+
# optional, must be specified for the lookup to succeed,
|
129
|
+
# if your app is only published to one country
|
130
|
+
# passed value must be a country code
|
131
|
+
country: 'at')
|
132
|
+
|
116
133
|
version = get_app_store_version_number(bundle_id: 'com.apple.Numbers')
|
117
134
|
|
135
|
+
version = get_app_store_version_number(bundle_id: 'com.apple.Numbers',
|
136
|
+
# optional two letter country code:
|
137
|
+
# specify if availability of your app is limited to a certain country
|
138
|
+
country: 'at')
|
139
|
+
|
118
140
|
```
|
119
141
|
|
120
142
|
### get_version_number_from_git_branch
|
@@ -204,6 +226,13 @@ increment_version_number_in_xcodeproj(
|
|
204
226
|
# Automatically increment patch version number. Use App Store version number as a source.
|
205
227
|
version_source: 'appstore'
|
206
228
|
)
|
229
|
+
increment_version_number_in_xcodeproj(
|
230
|
+
# Automatically increment patch version number. Use App Store version number as a source.
|
231
|
+
version_source: 'appstore',
|
232
|
+
# optional two letter country code:
|
233
|
+
# specify if availability of your app is limited to a certain country
|
234
|
+
country: 'at'
|
235
|
+
)
|
207
236
|
|
208
237
|
increment_version_number_in_xcodeproj(
|
209
238
|
# specify specific version number (optional, omitting it increments patch version number)
|
@@ -273,6 +302,14 @@ increment_build_number_in_plist(
|
|
273
302
|
|
274
303
|
## Issues and Feedback
|
275
304
|
|
305
|
+
### SwiftPM
|
306
|
+
|
307
|
+
SwiftPM can be tedious when using this plugin, at least in terms of git history and `xcodeproj`s. Up until recently, there were a number of annoyances caused by this plugin (and a downstream dependency of it) because writing to a project file would clobber some of the comment metadata inside of the project file and replace them - leaving you with the actual version change, but a number of other, less desirable changes too to hand pick through (or give up this plugin for). The advice is, update to `>= 0.4.6` of this plugin, and follow [this advice](https://github.com/SiarheiFedartsou/fastlane-plugin-versioning/issues/59#issuecomment-878255057) - which is to make sure not to include the `.git` at the end of your SwiftPM dependency URLs.
|
308
|
+
|
309
|
+
### New / Fresh projects
|
310
|
+
|
311
|
+
Note that you will need to set the build and version numbers through Xcode's UI at least once to use this plugin without weird `nil:NilClass` issues. See this [issue](https://github.com/SiarheiFedartsou/fastlane-plugin-versioning/issues/60) for context
|
312
|
+
|
276
313
|
For any other issues and feedback about this plugin, please submit it to this repository.
|
277
314
|
|
278
315
|
## Troubleshooting
|
@@ -16,7 +16,11 @@ module Fastlane
|
|
16
16
|
bundle_id = GetInfoPlistValueAction.run(path: plist, key: 'CFBundleIdentifier') # TODO: add same kind of flag to support build setting variables
|
17
17
|
end
|
18
18
|
|
19
|
-
|
19
|
+
if params[:country]
|
20
|
+
uri = URI("http://itunes.apple.com/lookup?bundleId=#{bundle_id}&country=#{params[:country]}")
|
21
|
+
else
|
22
|
+
uri = URI("http://itunes.apple.com/lookup?bundleId=#{bundle_id}")
|
23
|
+
end
|
20
24
|
Net::HTTP.get(uri)
|
21
25
|
|
22
26
|
response = Net::HTTP.get_response(uri)
|
@@ -66,7 +70,11 @@ module Fastlane
|
|
66
70
|
FastlaneCore::ConfigItem.new(key: :build_configuration_name,
|
67
71
|
optional: true,
|
68
72
|
conflicting_options: [:bundle_id],
|
69
|
-
description: "Specify a specific build configuration if you have different Info.plist build settings for each configuration")
|
73
|
+
description: "Specify a specific build configuration if you have different Info.plist build settings for each configuration"),
|
74
|
+
FastlaneCore::ConfigItem.new(key: :country,
|
75
|
+
optional: true,
|
76
|
+
description: "Pass an optional country code, if your app's availability is limited to specific countries",
|
77
|
+
is_string: true)
|
70
78
|
]
|
71
79
|
end
|
72
80
|
|
@@ -129,6 +129,10 @@ module Fastlane
|
|
129
129
|
UI.user_error!("Available values are 'plist' and 'appstore'") unless ['plist', 'appstore'].include? value
|
130
130
|
end,
|
131
131
|
description: "Source version to increment. Available options: plist, appstore"),
|
132
|
+
FastlaneCore::ConfigItem.new(key: :country,
|
133
|
+
optional: true,
|
134
|
+
description: "Pass an optional country code, if your app's availability is limited to specific countries",
|
135
|
+
is_string: true),
|
132
136
|
FastlaneCore::ConfigItem.new(key: :plist_build_setting_support,
|
133
137
|
description: "support automatic resolution of build setting from xcodeproj if not a literal value in the plist",
|
134
138
|
is_string: false,
|
@@ -159,6 +159,10 @@ module Fastlane
|
|
159
159
|
UI.user_error!("Available values are 'xcodeproj' and 'appstore'") unless ['xcodeproj', 'appstore'].include? value
|
160
160
|
end,
|
161
161
|
description: "Source version to increment. Available options: xcodeproj, appstore"),
|
162
|
+
FastlaneCore::ConfigItem.new(key: :country,
|
163
|
+
optional: true,
|
164
|
+
description: "Pass an optional country code, if your app's availability is limited to specific countries",
|
165
|
+
is_string: true),
|
162
166
|
FastlaneCore::ConfigItem.new(key: :plist_build_setting_support,
|
163
167
|
description: "support automatic resolution of build setting from xcodeproj if not a literal value in the plist",
|
164
168
|
is_string: false,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-versioning
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Siarhei Fiedartsou
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-07-
|
12
|
+
date: 2021-07-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pry
|