VIVO-262 Complete the push script. Add more checking to extract_files.

This commit is contained in:
j2blake 2013-09-13 17:24:59 -04:00
parent 9dcf9d50e1
commit 5b8309bcbc
2 changed files with 62 additions and 2 deletions

View file

@ -0,0 +1,39 @@
=begin
--------------------------------------------------------------------------------
Push any branches, tags, or merges back to GitHub.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
=end
$: << File.dirname(File.expand_path(__FILE__))
require '_common'
#
# Merge the maintenance branch to the master branch and create the tag.
#
def push_to_origin(repo_path)
Dir.chdir(repo_path) do |path|
approve_and_execute(["git push --all", "git push --tags"], "in #{path}")
end
end
#
# ------------------------------------------------------------------------------------
# Main method
# ------------------------------------------------------------------------------------
#
begin
vivo_path = Settings.vivo_path
vitro_path = Settings.vitro_path
get_permission_and_go("OK to push changes to the origin?") do
puts "Merging tags"
push_to_origin(vivo_path)
push_to_origin(vitro_path)
end
rescue BadState
puts "#{$!.message} - Aborting."
end