capistrano-magento 0.0.1 → 0.1.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 +4 -4
- data/README.md +5 -2
- data/capistrano-magento.gemspec +1 -1
- data/lib/capistrano/tasks/magento.rake +57 -24
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d48ec6d3d5b76ed49573cf382157ac29e225b17
|
4
|
+
data.tar.gz: 1104bc396960364a787bab3d1f3aecc309cf60f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02451b770604f37b3482db2865d41ba838848b0ed4cd641cec935402ad4811a91a13e7981938562dae241158d16a3895deb34c8f52477ca5f5718a6f0aacd76a
|
7
|
+
data.tar.gz: 7d9bff294a1ae0811f393ce44d0c5a8a1a88dd7459d9cd721dfe331b55eaf724889548112d4b1c970aeac13538ac4d91b88165b0b7ab74dcb84b4bfd0648dd21
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Capistrano::Magento
|
2
2
|
|
3
|
-
[Magento](http://magento.com) specific tasks and defaults for [Capistrano](https://github.com/capistrano/capistrano) deployment.
|
3
|
+
[Magento](http://magento.com) specific tasks and defaults for [Capistrano 3](https://github.com/capistrano/capistrano) deployment.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -35,7 +35,10 @@ These are the available Magento specific tasks, most of these are shortcuts to t
|
|
35
35
|
|
36
36
|
$ cap -T
|
37
37
|
...
|
38
|
-
cap magento:
|
38
|
+
cap magento:cache:clear # Clear the Magento Cache
|
39
|
+
cap magento:cache:flush # Flush the Magento Cache
|
40
|
+
cap magento:cache:clean_merged_js_css # Clear the Magento Cache
|
41
|
+
cap magento:cache:clean_page_cache # Clear the Magento Cache
|
39
42
|
cap magento:compiler:clear # Disable compiler include path and remove compiled files
|
40
43
|
cap magento:compiler:compile # Run compilation process and enable compiler include path
|
41
44
|
cap magento:compiler:disable # Disable compiler include path
|
data/capistrano-magento.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "capistrano-magento"
|
7
|
-
gem.version = "0.0
|
7
|
+
gem.version = "0.1.0"
|
8
8
|
gem.authors = ["Peter Rhoades"]
|
9
9
|
gem.email = ["createdbypete@gmail.com"]
|
10
10
|
gem.description = %q{Magento specific tasks for Capistrano}
|
@@ -1,28 +1,59 @@
|
|
1
1
|
namespace :magento do
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
namespace :cache do
|
3
|
+
|
4
|
+
desc "Clear the Magento Cache"
|
5
|
+
task :clear do
|
6
|
+
on roles(fetch(:magento_roles)) do
|
7
|
+
within fetch(:magento_working_dir) do
|
8
|
+
execute :php, "-r", "\"require_once('app/Mage.php'); Mage::app()->cleanCache(); \""
|
9
|
+
end
|
10
|
+
end
|
7
11
|
end
|
8
|
-
|
12
|
+
|
13
|
+
desc "Flush the Magento Cache Storage"
|
14
|
+
task :flush do
|
15
|
+
on roles(fetch(:magento_roles)) do
|
16
|
+
within fetch(:magento_working_dir) do
|
17
|
+
execute :php, "-r", "\"require_once('app/Mage.php'); Mage::dispatchEvent('adminhtml_cache_flush_all'); Mage::app()->getCacheInstance()->flush(); \""
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
desc "Clean Merged Js Css"
|
23
|
+
task :clean_merged_js_css do
|
24
|
+
on roles(fetch(:magento_roles)) do
|
25
|
+
within fetch(:magento_working_dir) do
|
26
|
+
execute :php, "-r", "\"require_once('app/Mage.php'); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); Mage::getModel('core/design_package')->cleanMergedJsCss(); Mage::dispatchEvent('clean_media_cache_after'); \""
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
desc "Clean the Magento external Page Cache"
|
32
|
+
task :clean_page_cache do
|
33
|
+
on roles(fetch(:magento_roles)) do
|
34
|
+
within fetch(:magento_working_dir) do
|
35
|
+
execute :php, "-r", "\"require_once('app/Mage.php'); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); if (Mage::helper('pagecache')->isEnabled()) { Mage::helper('pagecache')->getCacheControlInstance()->clean(); } \""
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
9
40
|
end
|
10
41
|
|
11
42
|
namespace :maintenance do
|
12
43
|
desc "Turn on maintenance mode by creating maintenance.flag file"
|
13
44
|
task :on do
|
14
|
-
on roles(:
|
15
|
-
within
|
16
|
-
execute :touch, "#{
|
45
|
+
on roles(fetch(:magento_roles)) do
|
46
|
+
within fetch(:magento_working_dir) do
|
47
|
+
execute :touch, "#{fetch(:magento_working_dir)}/maintenance.flag"
|
17
48
|
end
|
18
49
|
end
|
19
50
|
end
|
20
51
|
|
21
52
|
desc "Turn off maintenance mode by removing maintenance.flag file"
|
22
53
|
task :off do
|
23
|
-
on roles(:
|
24
|
-
within
|
25
|
-
execute :rm, "-f", "#{
|
54
|
+
on roles(fetch(:magento_roles)) do
|
55
|
+
within fetch(:magento_working_dir) do
|
56
|
+
execute :rm, "-f", "#{fetch(:magento_working_dir)}/maintenance.flag"
|
26
57
|
end
|
27
58
|
end
|
28
59
|
end
|
@@ -31,8 +62,8 @@ namespace :magento do
|
|
31
62
|
namespace :compiler do
|
32
63
|
desc "Run compilation process and enable compiler include path"
|
33
64
|
task :compile do
|
34
|
-
on roles(:
|
35
|
-
within
|
65
|
+
on roles(fetch(:magento_roles)) do
|
66
|
+
within fetch(:magento_working_dir).join('shell') do
|
36
67
|
execute :php, "-f", "compiler.php", "--", "compile"
|
37
68
|
end
|
38
69
|
end
|
@@ -40,8 +71,8 @@ namespace :magento do
|
|
40
71
|
|
41
72
|
desc "Enable compiler include path"
|
42
73
|
task :enable do
|
43
|
-
on roles(:
|
44
|
-
within
|
74
|
+
on roles(fetch(:magento_roles)) do
|
75
|
+
within fetch(:magento_working_dir).join('shell') do
|
45
76
|
execute :php, "-f", "compiler.php", "--", "enable"
|
46
77
|
end
|
47
78
|
end
|
@@ -49,8 +80,8 @@ namespace :magento do
|
|
49
80
|
|
50
81
|
desc "Disable compiler include path"
|
51
82
|
task :disable do
|
52
|
-
on roles(:
|
53
|
-
within
|
83
|
+
on roles(fetch(:magento_roles)) do
|
84
|
+
within fetch(:magento_working_dir).join('shell') do
|
54
85
|
execute :php, "-f", "compiler.php", "--", "disable"
|
55
86
|
end
|
56
87
|
end
|
@@ -58,8 +89,8 @@ namespace :magento do
|
|
58
89
|
|
59
90
|
desc "Disable compiler include path and remove compiled files"
|
60
91
|
task :clear do
|
61
|
-
on roles(:
|
62
|
-
within
|
92
|
+
on roles(fetch(:magento_roles)) do
|
93
|
+
within fetch(:magento_working_dir).join('shell') do
|
63
94
|
execute :php, "-f", "compiler.php", "--", "clear"
|
64
95
|
end
|
65
96
|
end
|
@@ -69,8 +100,8 @@ namespace :magento do
|
|
69
100
|
namespace :indexer do
|
70
101
|
desc "Reindex data by all indexers"
|
71
102
|
task :reindexall do
|
72
|
-
on roles(:
|
73
|
-
within
|
103
|
+
on roles(fetch(:magento_roles)) do
|
104
|
+
within fetch(:magento_working_dir).join('shell') do
|
74
105
|
execute :php, "-f", "indexer.php", "--", "reindexall"
|
75
106
|
end
|
76
107
|
end
|
@@ -80,8 +111,8 @@ namespace :magento do
|
|
80
111
|
namespace :logs do
|
81
112
|
desc "Clean logs"
|
82
113
|
task :clean do
|
83
|
-
on roles(:
|
84
|
-
within
|
114
|
+
on roles(fetch(:magento_roles)) do
|
115
|
+
within fetch(:magento_working_dir).join('shell') do
|
85
116
|
execute :php, "-f", "log.php", "--", "clean"
|
86
117
|
end
|
87
118
|
end
|
@@ -93,5 +124,7 @@ namespace :load do
|
|
93
124
|
task :defaults do
|
94
125
|
set :linked_dirs, fetch(:linked_dirs, []).push("var", "media", "sitemaps")
|
95
126
|
set :linked_files, fetch(:linked_files, []).push("app/etc/local.xml")
|
127
|
+
set :magento_roles, :all
|
128
|
+
set :magento_working_dir, -> { release_path }
|
96
129
|
end
|
97
130
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-magento
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Rhoades
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -60,7 +60,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
60
|
version: '0'
|
61
61
|
requirements: []
|
62
62
|
rubyforge_project:
|
63
|
-
rubygems_version: 2.
|
63
|
+
rubygems_version: 2.6.10
|
64
64
|
signing_key:
|
65
65
|
specification_version: 4
|
66
66
|
summary: Magento specific tasks for Capistrano
|