one more shot

This commit is contained in:
Sami Samhuri 2015-04-25 00:28:19 -07:00
parent 0a68892774
commit 7aa42fdbf8

View file

@ -374,8 +374,10 @@ class HarpBlog
def run(cmd, safety = :destructive) def run(cmd, safety = :destructive)
if safety == :destructive && @dry_run if safety == :destructive && @dry_run
puts ">>> cd '#{@path}' && #{cmd}" puts ">>> cd '#{@path}' && #{cmd}"
true
else else
`cd '#{@path}' && #{cmd} 2>&1` `cd '#{@path}' && #{cmd} 2>&1`
$?.success?
end end
end end
@ -404,7 +406,9 @@ class HarpBlog
end end
def git_update(remote = 'origin') def git_update(remote = 'origin')
run "git update #{remote} && rm #{origin_updated_path}" if run "git update #{remote}", :nondestructive
File.unlink origin_updated_path
end
end end
def origin_updated? def origin_updated?