capistrano-magento2 0.5.4 → 0.5.5
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 +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/capistrano/magento2.rb +10 -0
- data/lib/capistrano/magento2/version.rb +1 -1
- data/lib/capistrano/tasks/deploy.rake +16 -7
- data/lib/capistrano/tasks/magento.rake +46 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab43aa471d09b1d480dcc26eecc39e9155887fe7
|
4
|
+
data.tar.gz: 3becffe86075bae268551e1f441bd93a1fef7246
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae3e8515b724bb656e48b836076ef393bb90416dee9542f9b9f30339f1231c7b4e84fa79be6cc7ce337aa1931606169981b1348ca6f29c5aff911a2839ce7817
|
7
|
+
data.tar.gz: cf875fc79fabb210c25886b500610ca9ded11c0dbe03a637f70061745f5033358bff87ca2c64b5ccd080504c46083c9866bb547cc66474a6d9389fa1a64df6ae
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# Capistrano::Magento2 Change Log
|
2
2
|
|
3
|
+
0.5.5
|
4
|
+
==========
|
5
|
+
|
6
|
+
* Fixed DI artifact mismatch caused by setup:ugprade overwriting frozen config.php post compilation
|
7
|
+
* Removed redundant (and non-functional) commands from deploy:reverted task
|
8
|
+
* Added informational output which lists the installed modules which are disabled per `app/etc/config.php`
|
9
|
+
|
3
10
|
0.5.4
|
4
11
|
==========
|
5
12
|
|
data/lib/capistrano/magento2.rb
CHANGED
@@ -16,6 +16,16 @@ module Capistrano
|
|
16
16
|
return (capture "/usr/bin/env php -f #{release_path}/bin/magento -- -V").split(' ').pop.to_f
|
17
17
|
end
|
18
18
|
|
19
|
+
def disabled_modules
|
20
|
+
output = capture :magento, 'module:status'
|
21
|
+
output = output.split("disabled modules:\n", 2)[1]
|
22
|
+
|
23
|
+
if output == nil or output.strip == "None"
|
24
|
+
return []
|
25
|
+
end
|
26
|
+
return output.split("\n")
|
27
|
+
end
|
28
|
+
|
19
29
|
def cache_hosts
|
20
30
|
return fetch(:magento_deploy_cache_shared) ? (primary fetch :magento_deploy_setup_role) : (release_roles :all)
|
21
31
|
end
|
@@ -7,6 +7,8 @@
|
|
7
7
|
# http://davidalger.com/contact/
|
8
8
|
##
|
9
9
|
|
10
|
+
include Capistrano::Magento2::Helpers
|
11
|
+
|
10
12
|
namespace :deploy do
|
11
13
|
before 'deploy:check:linked_files', 'magento:deploy:check'
|
12
14
|
|
@@ -37,7 +39,20 @@ namespace :deploy do
|
|
37
39
|
end
|
38
40
|
end
|
39
41
|
|
40
|
-
invoke 'magento:setup:upgrade'
|
42
|
+
invoke 'magento:setup:db:schema:upgrade'
|
43
|
+
invoke 'magento:setup:db:data:upgrade'
|
44
|
+
|
45
|
+
on primary fetch(:magento_deploy_setup_role) do
|
46
|
+
within release_path do
|
47
|
+
_disabled_modules = disabled_modules
|
48
|
+
if _disabled_modules.count > 0
|
49
|
+
info "\nThe following modules are disabled per app/etc/config.php:\n"
|
50
|
+
_disabled_modules.each do |module_name|
|
51
|
+
info '- ' + module_name
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
41
56
|
end
|
42
57
|
|
43
58
|
task :published do
|
@@ -45,10 +60,4 @@ namespace :deploy do
|
|
45
60
|
invoke 'magento:cache:varnish:ban'
|
46
61
|
invoke 'magento:maintenance:disable' if fetch(:magento_deploy_maintenance)
|
47
62
|
end
|
48
|
-
|
49
|
-
task :reverted do
|
50
|
-
invoke 'magento:maintenance:disable' if fetch(:magento_deploy_maintenance)
|
51
|
-
invoke 'magento:cache:flush'
|
52
|
-
invoke 'magento:cache:varnish:ban'
|
53
|
-
end
|
54
63
|
end
|
@@ -144,15 +144,60 @@ namespace :magento do
|
|
144
144
|
end
|
145
145
|
|
146
146
|
namespace :setup do
|
147
|
-
desc '
|
147
|
+
desc 'Updates the module load sequence and upgrades database schemas and data fixtures'
|
148
148
|
task :upgrade do
|
149
149
|
on primary fetch(:magento_deploy_setup_role) do
|
150
150
|
within release_path do
|
151
|
+
warn "\e[0;31mWarning: Use of magento:setup:upgrade on production systems is discouraged." +
|
152
|
+
" See https://github.com/davidalger/capistrano-magento2/issues/34 for details.\e[0m\n"
|
153
|
+
|
151
154
|
execute :magento, 'setup:upgrade --keep-generated'
|
152
155
|
end
|
153
156
|
end
|
154
157
|
end
|
155
158
|
|
159
|
+
namespace :db do
|
160
|
+
desc 'Checks if database schema and/or data require upgrading'
|
161
|
+
task :status do
|
162
|
+
on primary fetch(:magento_deploy_setup_role) do
|
163
|
+
within release_path do
|
164
|
+
execute :magento, 'setup:db:status'
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
task :upgrade do
|
170
|
+
on primary fetch(:magento_deploy_setup_role) do
|
171
|
+
within release_path do
|
172
|
+
db_status = capture :magento, 'setup:db:status', verbosity: Logger::INFO
|
173
|
+
|
174
|
+
if not db_status.to_s.include? 'All modules are up to date'
|
175
|
+
execute :magento, 'setup:db-schema:upgrade'
|
176
|
+
execute :magento, 'setup:db-data:upgrade'
|
177
|
+
end
|
178
|
+
end
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
desc 'Upgrades data fixtures'
|
183
|
+
task 'schema:upgrade' do
|
184
|
+
on primary fetch(:magento_deploy_setup_role) do
|
185
|
+
within release_path do
|
186
|
+
execute :magento, 'setup:db-schema:upgrade'
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
desc 'Upgrades database schema'
|
192
|
+
task 'data:upgrade' do
|
193
|
+
on primary fetch(:magento_deploy_setup_role) do
|
194
|
+
within release_path do
|
195
|
+
execute :magento, 'setup:db-data:upgrade'
|
196
|
+
end
|
197
|
+
end
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
156
201
|
desc 'Sets proper permissions on application'
|
157
202
|
task :permissions do
|
158
203
|
on release_roles :all do
|
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.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Alger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|