class EacLauncher::Git::MirrorUpdate
Public Class Methods
new(target_path, source_path, source_rev)
click to toggle source
Calls superclass method
EacLauncher::Paths::Real::new
# File lib/eac_launcher/git/mirror_update.rb, line 10 def initialize(target_path, source_path, source_rev) super(target_path) @target_git = ::EacLauncher::Git::Base.new(self) @source_git = ::EacLauncher::Git::Base.new(source_path) @source_rev = source_rev run end
Private Instance Methods
fetch_remote_source()
click to toggle source
# File lib/eac_launcher/git/mirror_update.rb, line 25 def fetch_remote_source @target_git.git @target_git.assert_remote_url('origin', @source_git) @target_git.fetch('origin', tags: true) end
reset_source_rev()
click to toggle source
# File lib/eac_launcher/git/mirror_update.rb, line 31 def reset_source_rev @target_git.reset_hard(@source_git.rev_parse(@source_rev, true)) end
run()
click to toggle source
# File lib/eac_launcher/git/mirror_update.rb, line 20 def run fetch_remote_source reset_source_rev end