Skip to content

Commit

Permalink
add upgrade message
Browse files Browse the repository at this point in the history
  • Loading branch information
EugenMayer committed Mar 17, 2018
1 parent 20d066d commit 35952d9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/docker-sync/upgrade_check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,17 @@ def check_and_warn
end
end

if Gem::Version.new(last_upgraded_version) < Gem::Version.new('0.5.6')
checker = UpdateChecker.new
checker.check_unison_image

Thor::Shell::Basic.new.say_status 'warning', "If you are upgrading from 0.5.4 or below, please run `brew update && brew upgrade unison` AND `docker-compose down && docker-sync clean` or `docker-sync-stack clean` since you need to recreate the sync container", :red

unless Thor::Shell::Basic.new.yes?('Sync will fail otherwise. Continue? (y/N)')
exit 1
end
end

# update the upgrade_status
@config.update! 'upgrade_status' => "#{UpgradeChecker.get_current_version}"
end
Expand Down

0 comments on commit 35952d9

Please sign in to comment.