Skip to content

Commit

Permalink
Add a post install/update message
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kennyadsl committed Mar 10, 2021
1 parent 8fec51e commit 7c1da5d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
12 changes: 7 additions & 5 deletions core/lib/tasks/upgrade.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 20 additions & 0 deletions core/solidus_core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7c1da5d

Please sign in to comment.