adapt the release scripts to an older Git client
This commit is contained in:
parent
3df439c4a7
commit
02280e6171
3 changed files with 14 additions and 13 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue