Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Commit

Permalink
#123 Accept a broader range of affirmative values when confirming an …
Browse files Browse the repository at this point in the history
…upgrade.

Also did some code cleanup.
  • Loading branch information
dmcassel committed Aug 16, 2013
1 parent 56d7fd1 commit 7ccc578
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.mdown
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,4 @@ This file describes changes made to Roxy per release
* \#104 Deployer was ignoring the forest-data-dir property
* \#110 Updated bootstrap procedure to work with new ML7 endpoint
* \#118 Apply field settings
* \#123 Accept a broader range of affirmative responses when upgrading
16 changes: 8 additions & 8 deletions deploy/lib/upgrader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,30 +58,30 @@ def upgrade(args)
print "into a source code repository, such as Git or Subversion. Doing so\n"
print "will make it much easier to fix problems if something goes wrong.\n"

print "\nAre you ready to proceed?\n"
print "\nAre you ready to proceed? [y/N]\n"
confirm = gets.chomp

if confirm == 'y'
puts "time to upgrade to the #{branch} branch"
if confirm.match(/^y(es)?$/i)
@logger.info "Upgrading to the #{branch} branch"
tmp_dir = Dir.mktmpdir

puts "Cloning Roxy in a temp directory..."
@logger.info "Cloning Roxy in a temp directory..."
system("git clone git://github.com/marklogic/roxy.git -b #{branch} #{tmp_dir}")

puts "Upgrading base project files\n"
@logger.info "Upgrading base project files\n"
upgrade_base(tmp_dir)

puts "Upgrading deploy/ files\n"
@logger.info "Upgrading deploy/ files\n"
upgrade_deploy(tmp_dir)

if (["mvc", "hybrid"].include? @app_type)
puts "Upgrading src/roxy files\n"
@logger.info "Upgrading src/roxy files\n"
upgrade_src(tmp_dir)
end

FileUtils.rm_rf(tmp_dir)
else
puts "later"
puts "Aborting upgrade"
end

end
Expand Down

0 comments on commit 7ccc578

Please sign in to comment.