Class: Pod::Source

Inherits:
Object
  • Object
show all
Defined in:
lib/cocoapods-ve/ext/sources_manager.rb

Instance Method Summary collapse

Instance Method Details

#update_git_repo(show_output = false) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/cocoapods-ve/ext/sources_manager.rb', line 5

def update_git_repo(show_output = false)
    Config.instance.with_changes(:verbose => show_output) do
        begin
            args = %W(-C #{repo} fetch origin)
            args.push('--progress') if show_output
            git!(args)
            current_branch = git!(%W(-C #{repo} rev-parse --abbrev-ref HEAD)).strip
            git!(%W(-C #{repo} reset --hard origin/#{current_branch}))
        rescue Exception => e
            UI.warn 'Unable g error, clean and re clone'
            `rm -rf #{repo}`
            git!(%W( clone #{url} #{repo}))

        end 
        
    end
rescue
    raise Informative, 'CocoaPods was not able to update the ' \
        "`#{name}` repo. If this is an unexpected issue " \
        'and persists you can inspect it running ' \
        '`pod repo update --verbose`'
end

#update_git_repo_tObject



4
# File 'lib/cocoapods-ve/ext/sources_manager.rb', line 4

alias update_git_repo_t update_git_repo