gonative-cli 1.5.4 → 1.5.5
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/Gemfile.lock +1 -1
- data/lib/gonative/commands/ios/set_project_version.rb +17 -0
- data/lib/gonative/commands.rb +1 -0
- data/lib/gonative/plugins/ios/helpers/build_setting_updater.rb +51 -0
- data/lib/gonative/plugins/ios/set_marketing_version.rb +1 -28
- data/lib/gonative/plugins/ios/set_project_version.rb +21 -0
- data/lib/gonative/version.rb +1 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2edf6448dec8b869c921622879c3d0c7c7678c73f446916ad53c6551dc78aea5
|
4
|
+
data.tar.gz: 1165a137804f2d089f97ee6f8fb5e8cba9c40ec72e36e1256473894ceeb77888
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e82c271878525ee29e1425ae291f0622442a82bbd658b4f401d7eb4d49d2e1ab97227e4216701e5922d422376051ee6888268e6c6e0729785c1d9ffd730bb2bf
|
7
|
+
data.tar.gz: d5e071c42c8c5ca838953a85b80ec3599cc688cac0e838d1285230fd333d82108b3d91d5a5721ee0a23ef874d55da3c407a36b1b44ed39c846866177a1ad1159
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module GoNative
|
4
|
+
module Commands
|
5
|
+
module IOS
|
6
|
+
class SetProjectVersion < Base
|
7
|
+
desc 'Sets current project version for iOS project'
|
8
|
+
|
9
|
+
argument :version, required: true, desc: 'Project version for the app (e.g., 123)'
|
10
|
+
|
11
|
+
def call(version:, **)
|
12
|
+
Plugins::IOS::SetProjectVersion.call(version)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/gonative/commands.rb
CHANGED
@@ -12,6 +12,7 @@ module GoNative
|
|
12
12
|
register 'ios embed-scripts', IOS::EmbedScripts
|
13
13
|
register 'ios set-bundle-id', IOS::SetBundleId
|
14
14
|
register 'ios set-marketing-version', IOS::SetMarketingVersion
|
15
|
+
register 'ios set-project-version', IOS::SetProjectVersion
|
15
16
|
register 'ios rename', IOS::Rename
|
16
17
|
register 'ios version', IOS::Version
|
17
18
|
register 'ios add-language', IOS::AddLanguage
|
@@ -0,0 +1,51 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'xcodeproj'
|
4
|
+
|
5
|
+
module GoNative
|
6
|
+
module Plugins
|
7
|
+
module IOS
|
8
|
+
module Helpers
|
9
|
+
class BuildSettingUpdater
|
10
|
+
extend DSL::Serviceable
|
11
|
+
|
12
|
+
attr_reader :value, :build_setting_key
|
13
|
+
|
14
|
+
def initialize(value, build_setting_key)
|
15
|
+
@value = value
|
16
|
+
@build_setting_key = build_setting_key
|
17
|
+
end
|
18
|
+
|
19
|
+
def call
|
20
|
+
update_project
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def update_project
|
26
|
+
proj = Xcodeproj::Project.open('./MedianIOS.xcodeproj')
|
27
|
+
|
28
|
+
proj.targets.each do |target|
|
29
|
+
# Skip test targets - only process main app and extensions
|
30
|
+
case target.product_type
|
31
|
+
when Xcodeproj::Constants::PRODUCT_TYPE_UTI[:application],
|
32
|
+
Xcodeproj::Constants::PRODUCT_TYPE_UTI[:app_extension]
|
33
|
+
set_target_build_setting(target, value)
|
34
|
+
else
|
35
|
+
next
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
proj.save
|
40
|
+
end
|
41
|
+
|
42
|
+
def set_target_build_setting(target, value)
|
43
|
+
target.build_configurations.each do |config|
|
44
|
+
config.build_settings[build_setting_key] = value
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -1,7 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'xcodeproj'
|
4
|
-
|
5
3
|
module GoNative
|
6
4
|
module Plugins
|
7
5
|
module IOS
|
@@ -15,32 +13,7 @@ module GoNative
|
|
15
13
|
end
|
16
14
|
|
17
15
|
def call
|
18
|
-
|
19
|
-
end
|
20
|
-
|
21
|
-
private
|
22
|
-
|
23
|
-
def update_project
|
24
|
-
proj = Xcodeproj::Project.open('./MedianIOS.xcodeproj')
|
25
|
-
|
26
|
-
proj.targets.each do |target|
|
27
|
-
# Skip test targets - only process main app and extensions
|
28
|
-
case target.product_type
|
29
|
-
when Xcodeproj::Constants::PRODUCT_TYPE_UTI[:application],
|
30
|
-
Xcodeproj::Constants::PRODUCT_TYPE_UTI[:app_extension]
|
31
|
-
set_target_marketing_version(target, marketing_version)
|
32
|
-
else
|
33
|
-
next
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
proj.save
|
38
|
-
end
|
39
|
-
|
40
|
-
def set_target_marketing_version(target, version)
|
41
|
-
target.build_configurations.each do |config|
|
42
|
-
config.build_settings['MARKETING_VERSION'] = version
|
43
|
-
end
|
16
|
+
Helpers::BuildSettingUpdater.call(marketing_version, 'MARKETING_VERSION')
|
44
17
|
end
|
45
18
|
end
|
46
19
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module GoNative
|
4
|
+
module Plugins
|
5
|
+
module IOS
|
6
|
+
class SetProjectVersion
|
7
|
+
extend DSL::Serviceable
|
8
|
+
|
9
|
+
attr_reader :project_version
|
10
|
+
|
11
|
+
def initialize(project_version)
|
12
|
+
@project_version = project_version
|
13
|
+
end
|
14
|
+
|
15
|
+
def call
|
16
|
+
Helpers::BuildSettingUpdater.call(project_version, 'CURRENT_PROJECT_VERSION')
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
data/lib/gonative/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gonative-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hunaid Hassan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-08-
|
11
|
+
date: 2025-08-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -231,6 +231,7 @@ files:
|
|
231
231
|
- lib/gonative/commands/ios/rename.rb
|
232
232
|
- lib/gonative/commands/ios/set_bundle_id.rb
|
233
233
|
- lib/gonative/commands/ios/set_marketing_version.rb
|
234
|
+
- lib/gonative/commands/ios/set_project_version.rb
|
234
235
|
- lib/gonative/commands/ios/version.rb
|
235
236
|
- lib/gonative/commands/version.rb
|
236
237
|
- lib/gonative/dsl/error_catchable.rb
|
@@ -244,11 +245,13 @@ files:
|
|
244
245
|
- lib/gonative/plugins/ios/embed_scripts.rb
|
245
246
|
- lib/gonative/plugins/ios/extract_extensions.rb
|
246
247
|
- lib/gonative/plugins/ios/helpers.rb
|
248
|
+
- lib/gonative/plugins/ios/helpers/build_setting_updater.rb
|
247
249
|
- lib/gonative/plugins/ios/helpers/spec_reader.rb
|
248
250
|
- lib/gonative/plugins/ios/release.rb
|
249
251
|
- lib/gonative/plugins/ios/rename.rb
|
250
252
|
- lib/gonative/plugins/ios/set_bundle_id.rb
|
251
253
|
- lib/gonative/plugins/ios/set_marketing_version.rb
|
254
|
+
- lib/gonative/plugins/ios/set_project_version.rb
|
252
255
|
- lib/gonative/plugins/ios/verify.rb
|
253
256
|
- lib/gonative/plugins/ios/version.rb
|
254
257
|
- lib/gonative/utils.rb
|
@@ -301,7 +304,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
301
304
|
- !ruby/object:Gem::Version
|
302
305
|
version: '0'
|
303
306
|
requirements: []
|
304
|
-
rubygems_version: 3.3
|
307
|
+
rubygems_version: 3.5.3
|
305
308
|
signing_key:
|
306
309
|
specification_version: 4
|
307
310
|
summary: CLI to create gonative plugins.
|