gonative-cli 1.5.4 → 1.5.6
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/build_framework.rb +1 -1
 - 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
 - data/templates/plugins/ios/common/PLUGIN_NAME.podspec.tpl +1 -1
 - metadata +5 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 9fd3e16aa80e616a08e2147bd78206d961a233543ed0631d9aab97626a9a3bc8
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 6e573e449b23effca005802f1344aaa3815c37dee6f1b460e8d46339d6b9680d
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 61949fbb4482552258e9ff94781a2cdc01882a2d24282f7e99d24a4d01ee2e53db558b6d6df6679563f4151f737e57c54b3221c8149c9f87a6bf8b8dee699363
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 2702d5787c740d1eb5af9137710e0797fb677542a9830f1b0da179573169a9ef481d7f000a1d845998440698076bcd3f6a8654585b29e7498babae2302998d5f
         
     | 
    
        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
    
    
| 
         @@ -12,7 +12,7 @@ TODO: Add long description of the pod here. 
     | 
|
| 
       12 
12 
     | 
    
         
             
              s.author           = { 'hunaid' => 'hunaid@median.co' }
         
     | 
| 
       13 
13 
     | 
    
         
             
              s.source           = { :http => "https://pods.median.co/#{plugin_name}/#{plugin_name}-v#{s.version.to_s}.zip" }
         
     | 
| 
       14 
14 
     | 
    
         | 
| 
       15 
     | 
    
         
            -
              s.ios.deployment_target = ' 
     | 
| 
      
 15 
     | 
    
         
            +
              s.ios.deployment_target = '15.5'
         
     | 
| 
       16 
16 
     | 
    
         
             
              s.swift_versions = '5.0'
         
     | 
| 
       17 
17 
     | 
    
         | 
| 
       18 
18 
     | 
    
         
             
              s.subspec 'Source' do |cs|
         
     | 
    
        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.6
         
     | 
| 
       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- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2025-10-20 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
         
     |