capistrano-opscomplete 1.3.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a20eef8ec0a80982b18b4ce9f01d0b1596b56ae46f49ef1c8fcaf90d0172e7f0
4
- data.tar.gz: b01fc372be74a269ff2d31e8e5f004624b45f1e42b247a8b1435c7c2ab17ec18
3
+ metadata.gz: 41def2299510940af3ecf7d7400f1ffdedd794bbc75ff1b76f02925daec96b0e
4
+ data.tar.gz: 3c817b17846045ab58c6a0c8fe6a8b31752de7844ffd1edd1fca4c89dc29df25
5
5
  SHA512:
6
- metadata.gz: 23d4853424d027318d5054fde4e024a849b2575b75a07ee754177a7eb43a14262bee6bcb8cb956236bccf9ea7d625d4bb42b23ec20b895499346f8c2b50b8bb7
7
- data.tar.gz: 07ef3b9da3ec41136d4a2698e649b3413ebe035d294cb59546411a0111f571a45b9c2b64b8e542c299b7db1c033a47d1681dfcee9326db89b70389d773aa7e8b
6
+ metadata.gz: ec6794d100216b3fc49673a4e8e2a10f70ef434c2669ca88f563d206f63a41db4adedfb10a0bbbf655af4ef176bd68bb8c8a420d02bcf85fd438095eba394346
7
+ data.tar.gz: 1c0df6d6780d8141557894d56bad781b0125fbf82a7c7d41585c651871c0d1f2e48f3c3c9fc8af31750fe99c64c0421f3c4f1de3a7d976e84894134f951f7972
@@ -8,7 +8,7 @@ on:
8
8
 
9
9
  jobs:
10
10
  test:
11
- runs-on: ubuntu-20.04
11
+ runs-on: ubuntu-24.04
12
12
  strategy:
13
13
  fail-fast: false
14
14
  matrix:
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## [1.4.0] - 2025-11-11
2
+ ### Added
3
+ - Extended `opscomplete:nodejs:ensure` task with option to manage and install `corepack`
4
+ - Fixed Node.js version missing error message
5
+
6
+ ## [1.3.1] - 2025-03-07
7
+ ### Fixed
8
+ - Fix error with nvm: "Configured Node.js version: X.Y.Z is not installable"
9
+
1
10
  ## [1.3.0] - 2025-02-18
2
11
  ### Added
3
12
  - Add new capistrano task (`opscomplete:supervisor:disable`) which disables supervisor on non-procfile servers
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capistrano-opscomplete (1.3.1)
4
+ capistrano-opscomplete (1.4.0)
5
5
  capistrano (>= 3.0, < 4.0.0)
6
6
  rake
7
7
 
@@ -32,7 +32,7 @@ GEM
32
32
  parallel (1.20.1)
33
33
  parser (3.0.1.1)
34
34
  ast (~> 2.4.1)
35
- rack (3.0.12)
35
+ rack (3.1.18)
36
36
  rainbow (3.0.0)
37
37
  rake (13.0.6)
38
38
  rubocop (0.76.0)
data/README.md CHANGED
@@ -182,6 +182,18 @@ after 'deploy:published', 'opscomplete:puma:reload'
182
182
 
183
183
  The version for the NodeJS installation has to be a specific version and not a floating version like, e.g. lts/gallium.
184
184
 
185
+ ### Using Corepack
186
+
187
+ You may use Corepack to control your project's package manager, e.g. to use a modern version of Yarn or pnpm.
188
+
189
+ `capistrano-opscomplete` can install and enable Corepack for you during deployment. To do so, set the version with `:opscomplete_corepack_version` in your capistrano configuration. Then, add a [hook](#using-capistrano-hooks) in your capistrano configuration (e.g. `deploy.rb`), for example:
190
+
191
+ ```ruby
192
+ set :opscomplete_corepack_version, 'latest'
193
+
194
+ after 'deploy:updating', 'opscomplete:nodejs:ensure'
195
+ ```
196
+
185
197
  ## Contributing
186
198
 
187
199
  Bug reports and pull requests are welcome. Don't hesitate to [open a new issue](https://github.com/makandra/capistrano-opscomplete/issues/new).
@@ -97,7 +97,7 @@ module Capistrano
97
97
  app_version = capture(:nodejs_get_version, release_path)
98
98
 
99
99
  else
100
- raise Capistrano::ValidationError, 'Could not find application\'s Node.js version. Consider setting opscomplete_ruby_version.'
100
+ raise Capistrano::ValidationError, 'Could not find application\'s Node.js version. Consider setting opscomplete_nodejs_version.'
101
101
  end
102
102
 
103
103
  normalize_nodejs_version(app_version)
@@ -117,6 +117,18 @@ module Capistrano
117
117
  raise Capistrano::ValidationError, message unless dry_run?
118
118
  end
119
119
 
120
+ def app_corepack_version
121
+ if fetch(:opscomplete_corepack_version)
122
+ debug("Using version from :opscomplete_corepack_version setting: #{fetch(:opscomplete_corepack_version)}.")
123
+ corepack_version = fetch(:opscomplete_corepack_version)
124
+
125
+ else
126
+ corepack_version = nil
127
+ end
128
+
129
+ corepack_version
130
+ end
131
+
120
132
  private
121
133
 
122
134
  def normalize_nodejs_version(version)
@@ -49,6 +49,9 @@ namespace :opscomplete do
49
49
  validation_error!("#{host}: Configured Node.js version: #{app_nodejs_version} is not installable.")
50
50
  end
51
51
  execute(:nodejs_set_version, "'#{app_nodejs_version}'")
52
+ unless app_corepack_version.nil?
53
+ execute(:nodejs_install_corepack_version, "'#{app_corepack_version}'")
54
+ end
52
55
  end
53
56
  end
54
57
  end
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Opscomplete
3
- VERSION = '1.3.1'.freeze
3
+ VERSION = '1.4.0'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-opscomplete
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Makandra Operations
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-03-07 00:00:00.000000000 Z
11
+ date: 2025-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -86,7 +86,7 @@ dependencies:
86
86
  - - "<"
87
87
  - !ruby/object:Gem::Version
88
88
  version: 4.0.0
89
- description:
89
+ description:
90
90
  email:
91
91
  - ops@makandra.de
92
92
  executables: []
@@ -122,7 +122,7 @@ metadata:
122
122
  bug_tracker_uri: https://github.com/makandra/capistrano-opscomplete/issues
123
123
  changelog_uri: https://github.com/makandra/capistrano-opscomplete/blob/master/CHANGELOG.md
124
124
  source_code_uri: https://github.com/makandra/capistrano-opscomplete
125
- post_install_message:
125
+ post_install_message:
126
126
  rdoc_options: []
127
127
  require_paths:
128
128
  - lib
@@ -137,8 +137,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  - !ruby/object:Gem::Version
138
138
  version: 2.0.1
139
139
  requirements: []
140
- rubygems_version: 3.2.3
141
- signing_key:
140
+ rubygems_version: 3.0.3
141
+ signing_key:
142
142
  specification_version: 4
143
143
  summary: Capistrano tasks for easy deployment to a makandra opscomplete environment.
144
144
  test_files: []