Skip to content

Commit 7737808

Browse files
committed
Fix capistrano configuration
1 parent f38fd3d commit 7737808

7 files changed

Lines changed: 18 additions & 9 deletions

File tree

.github/workflows/decidim_ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: "[CI] Decidim"
22
on: [push]
33

44
env:
5-
RUBY_VERSION: 3.3.4
6-
NODE_VERSION: 18.17.1
5+
RUBY_VERSION: 3.4.7
6+
NODE_VERSION: 22.14.0
77

88
jobs:
99
tests:

Capfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ install_plugin Capistrano::SCM::Git
3131
# require "capistrano/rvm"
3232
require "capistrano/rbenv"
3333
# require "capistrano/chruby"
34+
require "capistrano/nvm"
3435
require "capistrano/bundler"
3536
require "capistrano/puma"
3637
require "capistrano/rails/assets"

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ group :development do
4242
gem "capistrano"
4343
gem "capistrano3-puma", "~> 6.0"
4444
gem "capistrano-bundler"
45+
gem "capistrano-nvm", require: false
4546
gem "capistrano-passenger"
4647
gem "capistrano-rails"
4748
gem "capistrano-rails-console"

Gemfile.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ GEM
140140
sshkit (>= 1.9.0)
141141
capistrano-bundler (2.2.0)
142142
capistrano (~> 3.1)
143+
capistrano-nvm (0.0.7)
144+
capistrano (~> 3.1)
143145
capistrano-passenger (0.2.1)
144146
capistrano (~> 3.0)
145147
capistrano-rails (1.7.0)
@@ -1107,6 +1109,7 @@ DEPENDENCIES
11071109
byebug
11081110
capistrano
11091111
capistrano-bundler
1112+
capistrano-nvm
11101113
capistrano-passenger
11111114
capistrano-rails
11121115
capistrano-rails-console
@@ -1179,6 +1182,7 @@ CHECKSUMS
11791182
byebug (13.0.0) sha256=d2263efe751941ca520fa29744b71972d39cbc41839496706f5d9b22e92ae05d
11801183
capistrano (3.20.1) sha256=b0d54ba5cf49bb194998bf6b427e889aa36ed05f545ecf7cc37acb9d529e9ae9
11811184
capistrano-bundler (2.2.0) sha256=47b4cf2ea17ea132bb0a5cabc5663443f5190a54f4da5b322d04e1558ff1468c
1185+
capistrano-nvm (0.0.7) sha256=08840032d33705052a7d101781302c2938b56f28ea4d640ab3cba34f1ee8210f
11821186
capistrano-passenger (0.2.1) sha256=07a1d25edd5c1d909c19d4fe45fe2ea5f11200569f6967f6bff1d605ade98e13
11831187
capistrano-rails (1.7.0) sha256=aca57455e8c5435785e0f938e16aa5b79c263694a755e1dca1c5d1743b40aae7
11841188
capistrano-rails-console (2.3.0) sha256=32fc936a8f142837d1da8a9067d224356db7c9beb1baa63a64be6527421332bc

config/deploy.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
# frozen_string_literal: true
22

33
# config valid for current version and patch releases of Capistrano
4-
lock "~> 3.19.2"
4+
lock "~> 3.20.1"
55

66
SSHKit.config.command_map[:sidekiq] = 'bundle exec sidekiq'
77
SSHKit.config.command_map[:sidekiqctl] = 'bundle exec sidekiqctl'
88

99
set :rbenv_type, :user
1010
set :rbenv_ruby, '3.4.7'
1111

12+
set :nvm_type, :user # or :system, depends on your nvm setup
13+
set :nvm_node, "v22.14.0"
14+
set :nvm_map_bins, %w(node npm)
15+
1216
set :application, "metadecidim"
1317
set :repo_url, "https://github.com/decidim/metadecidim.git"
1418

@@ -57,8 +61,7 @@
5761
task :decidim_webpacker_install do
5862
on roles(:all) do
5963
within release_path do
60-
execute :'. ~/.nvm/nvm.sh'
61-
execute 'npm', 'ci'
64+
execute :npm, 'ci'
6265
end
6366
end
6467
end

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"shakapacker": "^9.7.0"
2020
},
2121
"engines": {
22-
"node": "18.17.1",
23-
"npm": "9.6.7",
22+
"node": "22.14.0",
23+
"npm": ">=10.0.0",
2424
"yarn": "~1.22.1"
2525
}
2626
}

0 commit comments

Comments
 (0)