Skip to content

Commit

Permalink
Deprecate version manager tasks (#709)
Browse files Browse the repository at this point in the history
* Add deprecation messages for chruby, rbenv, rvm, and ry tasks

* Update default deploy.rb script
  • Loading branch information
lovro-bikic authored Jan 13, 2022
1 parent efc7c9f commit a387720
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 4 deletions.
6 changes: 4 additions & 2 deletions data/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

require 'mina/rails'
require 'mina/git'
# require 'mina/rbenv' # for rbenv support. (https://rbenv.org)
# require 'mina/rvm' # for rvm support. (https://rvm.io)

# Install https://github.com/mina-deploy/mina-version_managers for rbenv and rvm tasks
# require 'mina/version_managers/rbenv' # for rbenv support. (https://rbenv.org)
# require 'mina/version_managers/rvm' # for rvm support. (https://rvm.io)

# Basic settings:
# domain - The hostname to SSH to.
Expand Down
5 changes: 3 additions & 2 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ set :deploy_to, '/var/www/flipstack.com'
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
# require 'mina/rbenv' # for rbenv support. (http://rbenv.org)
# require 'mina/rvm' # for rvm support. (http://rvm.io)
# Install https://github.com/mina-deploy/mina-version_managers for rbenv and rvm tasks
# require 'mina/version_managers/rbenv' # for rbenv support. (https://rbenv.org)
# require 'mina/version_managers/rvm' # for rvm support. (https://rvm.io)
...
```
``` ruby
Expand Down
9 changes: 9 additions & 0 deletions tasks/mina/chruby.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# frozen_string_literal: true

unless fetch(:silence_deprecation_warnings)
warn '[DEPRECATION] chruby support will be removed from Mina in v2.0.0.'
warn '[DEPRECATION] To continue using chruby tasks, install `mina-version_managers` gem and'
warn "[DEPRECATION] replace `require 'mina/chruby'` with `require 'mina/version_managers/chruby'`."
warn '[DEPRECATION] See https://github.com/mina-deploy/mina-version_managers for more info.'
warn '[DEPRECATION] You can silence this message by adding `set :silence_deprecation_warnings, true` to `config/deploy.rb`.'
warn ''
end

set :chruby_path, '/etc/profile.d/chruby.sh'

task :chruby, :env do |_, args|
Expand Down
9 changes: 9 additions & 0 deletions tasks/mina/rbenv.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# frozen_string_literal: true

unless fetch(:silence_deprecation_warnings)
warn '[DEPRECATION] rbenv support will be removed from Mina in v2.0.0.'
warn '[DEPRECATION] To continue using rbenv tasks, install `mina-version_managers` gem and'
warn "[DEPRECATION] replace `require 'mina/rbenv'` with `require 'mina/version_managers/rbenv'`."
warn '[DEPRECATION] See https://github.com/mina-deploy/mina-version_managers for more info.'
warn '[DEPRECATION] You can silence this message by adding `set :silence_deprecation_warnings, true` to `config/deploy.rb`.'
warn ''
end

set :rbenv_path, '$HOME/.rbenv'

task :'rbenv:load' do
Expand Down
9 changes: 9 additions & 0 deletions tasks/mina/rvm.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# frozen_string_literal: true

unless fetch(:silence_deprecation_warnings)
warn '[DEPRECATION] RVM support will be removed from Mina in v2.0.0.'
warn '[DEPRECATION] To continue using RVM tasks, install `mina-version_managers` gem and'
warn "[DEPRECATION] replace `require 'mina/rvm'` with `require 'mina/version_managers/rvm'`."
warn '[DEPRECATION] See https://github.com/mina-deploy/mina-version_managers for more info.'
warn '[DEPRECATION] You can silence this message by adding `set :silence_deprecation_warnings, true` to `config/deploy.rb`.'
warn ''
end

set :rvm_use_path, '$HOME/.rvm/scripts/rvm'

task :'rvm:use', :env do |_, args|
Expand Down
9 changes: 9 additions & 0 deletions tasks/mina/ry.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# frozen_string_literal: true

unless fetch(:silence_deprecation_warnings)
warn '[DEPRECATION] ry support will be removed from Mina in v2.0.0.'
warn '[DEPRECATION] To continue using ry tasks, install `mina-version_managers` gem and'
warn "[DEPRECATION] replace `require 'mina/ry'` with `require 'mina/version_managers/ry'`."
warn '[DEPRECATION] See https://github.com/mina-deploy/mina-version_managers for more info.'
warn '[DEPRECATION] You can silence this message by adding `set :silence_deprecation_warnings, true` to `config/deploy.rb`.'
warn ''
end

set :ry_path, '$HOME/.local'

task :ry, :env do |_, args|
Expand Down

0 comments on commit a387720

Please sign in to comment.