Sha256: 452292353bb5341ac4ceb2ef95f5defd68fad8c37334cb681fd031e9119621ae

Contents?: true

Size: 1.54 KB

Versions: 2

Compression:

Stored size: 1.54 KB

Contents

module Pod
    class Command
        class JxedtCommand < Command
            class Binary < JxedtCommand
                class Push < Binary
                    self.summary = 'sync local files to git repo.'
                    self.description = <<-DESC
                    sync local files to git repo.
                    DESC
                    self.command = 'push'
                    self.arguments = [
                    ]
                    def self.options
                        [
                            ['--force-push', 'force push generated frameworks']
                        ]
                    end
                    def initialize(argv)
                        @force_push = argv.flag?('force-push', false)
                        super
                    end
        
                    def validate!
                        super
                    end
        
                    def run
                        podfile = Pod::Config.instance.podfile
                        help! '请检查命令执行路径,需要在Podfile文件所在目录执行' if podfile.nil?
                        help! '你需要在cache_repo中配置正确的git仓库地址!' unless Jxedt.config.cache_repo_enabled?

                        require 'cocoapods-jxedt/git_helper/cache_pucher'

                        output_dir = Pod::Config.instance.sandbox.root + Jxedt.config.binary_dir
                        Jxedt::CachePucher.push(output_dir, nil, @force_push)
                    end
                end
            end
        end
    end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cocoapods-jxedt-0.0.14 lib/cocoapods-jxedt/command/binary/command/push.rb
cocoapods-jxedt-0.0.13 lib/cocoapods-jxedt/command/binary/command/push.rb