mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +00:00
one more shot
This commit is contained in:
parent
0a68892774
commit
7aa42fdbf8
1 changed files with 5 additions and 1 deletions
|
|
@ -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?
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue