capistrano-magento2 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8469b82d98864aafd3331f72e0b5082243f835c8
4
- data.tar.gz: 8eeb51698b72e2a102ef151bfd2d14546c916232
3
+ metadata.gz: 65c2dad3cf15d919401c8553410a7b8cf444e9e3
4
+ data.tar.gz: a197832d493ef6ba2d6725b63e8f3ae2e2c7586e
5
5
  SHA512:
6
- metadata.gz: 3afa6eb01bbb5425ba083bc58c0f7efaead6307183847eebc01fb4b89ed3a5501b117e7d71679bcfb016fae5ec60a9b252dd04a1f60bfd87c984e28b10a2663c
7
- data.tar.gz: ce1bb3f5b21ce33a6d1fcdeb3b5733481109d415bf83afffb2f9ab2bd72ce5c8ffef675c1c8a53527f84aa875cf7df31c18772f184e23e730b1d18a93a675dbd
6
+ metadata.gz: 17d6863ccc339acc538abedfd0fc71e12a3414064f47dd09a63b028dfebffdf676b9babc60a312e18e7251c608b5fa2f40a0d6c2092a98a296ae1c3cb58b44c6
7
+ data.tar.gz: d9f4abb0ee29c32e9628efb2f03437e4e56b299d82e8622e86378d3e4c5ee7033a7344929f348dc2d974cad698352c376b3a866378919bae15e9a7a25aff7355
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Capistrano::Magento2 Change Log
2
2
 
3
+ 0.6.1
4
+ ==========
5
+
6
+ * Fixed Magento version check failing on some servers due to ansi output in non-interactive shells (issue #64)
7
+ * Added ability to configure Magento's composer authentication keys. See README for details (PR #56)
8
+ * Changed pending change log to hook into before `deploy:check` (previously hooked before `deploy`)
9
+
3
10
  0.6.0
4
11
  ==========
5
12
 
data/README.md CHANGED
@@ -170,6 +170,19 @@ If you would like to customize the linked files or directories for your project,
170
170
  append :linked_dirs, 'path/to/link'
171
171
  ```
172
172
 
173
+ ### Composer Auth Credentials
174
+
175
+ Magento 2's composer repository requires auth credentials to install. These can be set on target servers in a global composer `auth.json` file, the project's `composer.json` or by setting them in your deployment configuration using the following two settings:
176
+
177
+ ```ruby
178
+ set :magento_auth_public_key, '<your_public_key_here>'
179
+ set :magento_auth_private_key, '<your_prviate_key_here>'
180
+ ```
181
+
182
+ To obtain these credentials, reference the official documentation on DevDocs: [Get your authentication keys](http://devdocs.magento.com/guides/v2.0/install-gde/prereq/connect-auth.html)
183
+
184
+ **Caution:** When using these settings, the values will be logged to the `log/capistrano.log` file by SSHKit. They will not, however, be included in the general command output by default.
185
+
173
186
  ### Magento 2 Deploy Routine
174
187
 
175
188
  A pre-built deploy routine is available out-of-the-box. This can be overriden on a per-project basis by including only the Magento 2 specific tasks and defining your own `deploy.rake` file under `lib/capistrano/tasks` in your projects Capistrano install location.
@@ -233,7 +246,7 @@ No changes to deploy on web2 (from and to are the same: 2.1 -> 2.1)
233
246
  Are you sure you want to continue? [y/n]
234
247
  ```
235
248
 
236
- This conformational warning can be disabled by including the following in your project's configuration:
249
+ This confirmational warning can be disabled by including the following in your project's configuration:
237
250
 
238
251
  ```ruby
239
252
  set :magento_deploy_pending_warn, false
@@ -243,9 +256,9 @@ set :magento_deploy_pending_warn, false
243
256
 
244
257
  | setting | what it does
245
258
  | -------------------------------- | ------- | ---
246
- | `:magento_deploy_pending_role` | Roles to check for pending changes on. This defaults to `:all`
247
- | `:magento_deploy_pending_warn` | Set this to `false` to disable the conformational warning on zero-change deployment
248
- | `:magento_deploy_pending_format` | Can be used to set a custom change log format. See `defaults.rb` for example.
259
+ | `:magento_deploy_pending_role` | Role to check for pending changes on; defaults to `:all`
260
+ | `:magento_deploy_pending_warn` | Set this to `false` to disable confirmational warning on zero-change deployments
261
+ | `:magento_deploy_pending_format` | Can be used to set a custom change log format; refer to `defaults.rb` for example
249
262
 
250
263
  ### Pending Changes Tasks
251
264
 
@@ -13,7 +13,7 @@ module Capistrano
13
13
  module Magento2
14
14
  module Helpers
15
15
  def magento_version
16
- return Gem::Version::new((capture :php, "-f #{release_path}/bin/magento -- -V").split(' ').pop)
16
+ return Gem::Version::new((capture :php, "-f #{release_path}/bin/magento -- -V --no-ansi").split(' ').pop)
17
17
  end
18
18
 
19
19
  def disabled_modules
@@ -31,6 +31,11 @@ set :linked_dirs, fetch(:linked_dirs, []).push(
31
31
  'var/tmp'
32
32
  )
33
33
 
34
+ # magento composer repository auth credentials
35
+ set :magento_auth_repo_name, fetch(:magento_auth_repo_name, 'http-basic.repo.magento.com')
36
+ set :magento_auth_public_key, fetch(:magento_auth_public_key, false)
37
+ set :magento_auth_private_key, fetch(:magento_auth_private_key, false)
38
+
34
39
  # deploy permissions defaults
35
40
  set :magento_deploy_chmod_d, fetch(:magento_deploy_chmod_d, '2770')
36
41
  set :magento_deploy_chmod_f, fetch(:magento_deploy_chmod_f, '0660')
@@ -9,6 +9,6 @@
9
9
 
10
10
  module Capistrano
11
11
  module Magento2
12
- VERSION = '0.6.0'
12
+ VERSION = '0.6.1'
13
13
  end
14
14
  end
@@ -81,7 +81,7 @@ namespace :magento do
81
81
 
82
82
  namespace :composer do
83
83
  desc 'Run composer install'
84
- task :install do
84
+ task :install => :auth_config do
85
85
 
86
86
  on release_roles :all do
87
87
  within release_path do
@@ -106,6 +106,20 @@ namespace :magento do
106
106
  end
107
107
  end
108
108
  end
109
+
110
+ task :auth_config do
111
+ on release_roles :all do
112
+ within release_path do
113
+ if fetch(:magento_auth_public_key) and fetch(:magento_auth_private_key)
114
+ execute :composer, :config, '-q',
115
+ fetch(:magento_auth_repo_name),
116
+ fetch(:magento_auth_public_key),
117
+ fetch(:magento_auth_private_key),
118
+ verbosity: Logger::DEBUG
119
+ end
120
+ end
121
+ end
122
+ end
109
123
  end
110
124
 
111
125
  namespace :deploy do
@@ -9,7 +9,7 @@
9
9
 
10
10
  include Capistrano::Magento2::Pending
11
11
 
12
- before :deploy, 'deploy:pending:warn'
12
+ before 'deploy:check', 'deploy:pending:warn'
13
13
 
14
14
  namespace :deploy do
15
15
  desc "Displays a summary of commits pending deployment"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-magento2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Alger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-24 00:00:00.000000000 Z
11
+ date: 2017-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano