adapt the release scripts to an older Git client

This commit is contained in:
Jim Blake 2013-10-18 14:48:28 -04:00
parent 3df439c4a7
commit 02280e6171
3 changed files with 14 additions and 13 deletions

View file

@ -26,7 +26,7 @@ def export_files(vivo_path, vitro_path, tag, branch, export_dir)
cmds = ["git checkout #{branch}",
"git pull",
]
cmds.delete_at(1) unless is_remote_branch?(branch)
cmds.delete_at(1) unless remote_branch_exists?(path, branch)
approve_and_execute(cmds, "in #{path}")
end
@ -34,7 +34,7 @@ def export_files(vivo_path, vitro_path, tag, branch, export_dir)
cmds = ["git checkout #{branch}",
"git pull",
]
cmds.delete_at(1) unless is_remote_branch?(branch)
cmds.delete_at(1) unless remote_branch_exists?(path, branch)
approve_and_execute(cmds, "in #{path}")
end
@ -47,10 +47,6 @@ def export_files(vivo_path, vitro_path, tag, branch, export_dir)
])
end
def is_remote_branch?(branch)
! `git branch --list -a origin/#{branch}`.strip.empty?
end
#
# ------------------------------------------------------------------------------------
# Main method