From 7c1da5dfd02c5d3248275dfa8880b7a35b6bc30b Mon Sep 17 00:00:00 2001 From: Alberto Vena Date: Thu, 18 Feb 2021 17:32:21 +0100 Subject: [PATCH] Add a post install/update message We already introduced this post-install message in 2.11.5 when we started requesting users to run a rake task after bumping Solidus. Even if we don't have any specific rake task here in 3.0 we can keep this convention so we always have a place where to put this kind of tasks. Also, we can be consistent between versions in terms of how we request people to upgrade Solidus: 1. Change Gemfile 2. Run `bin/rails solidus:upgrade` Even if it does nothing special, I think it's a positive thing to have. --- core/lib/tasks/upgrade.rake | 12 +++++++----- core/solidus_core.gemspec | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/core/lib/tasks/upgrade.rake b/core/lib/tasks/upgrade.rake index d57aba14e43..cc784e2f48f 100644 --- a/core/lib/tasks/upgrade.rake +++ b/core/lib/tasks/upgrade.rake @@ -2,12 +2,14 @@ namespace :solidus do namespace :upgrade do - desc "Upgrade Solidus to version 2.11" - task two_point_eleven: [ - 'solidus:migrations:migrate_default_billing_addresses_to_address_book:up', - 'solidus:migrations:migrate_address_names:up' + task three_point_zero: [ + 'railties:install:migrations', + 'db:migrate' ] do - puts "Your Solidus install is ready for Solidus 2.11" + puts "Your Solidus install is ready for Solidus 3.0" end end + + desc "Upgrade to the current Solidus version" + task upgrade: 'upgrade:three_point_zero' end diff --git a/core/solidus_core.gemspec b/core/solidus_core.gemspec index 1cb01114fb6..76fba589d06 100644 --- a/core/solidus_core.gemspec +++ b/core/solidus_core.gemspec @@ -42,4 +42,24 @@ Gem::Specification.new do |s| s.add_dependency 'kt-paperclip', '~> 6.3' s.add_dependency 'ransack', '~> 2.0' s.add_dependency 'state_machines-activerecord', '~> 0.6' + + s.post_install_message = <<-MSG +------------------------------------------------------------- + Thank you for using Solidus +------------------------------------------------------------- +If this is a fresh install, don't forget to run the Solidus +installer with the following command: + +$ bin/rails g solidus:install + +If you are updating Solidus from an older version, please run +the following commands to complete the update: + +$ bin/rails solidus:upgrade + +Please report any issues at: +- https://github.com/solidusio/solidus/issues +- http://slack.solidus.io/ +------------------------------------------------------------- +MSG end