capistrano-sozo_magento2 1.5.1 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/capistrano/sozo_magento2/defaults.rb +5 -4
- data/lib/capistrano/sozo_magento2/version.rb +1 -1
- data/lib/capistrano/sozo_magento2.rb +1 -2
- data/lib/capistrano/tasks/magento2.rake +11 -0
- data/lib/capistrano/tasks/provision.rake +7 -1
- data/lib/capistrano/tasks/sozo.rake +1 -1
- data/lib/capistrano/tasks/wordpress.rake +26 -0
- metadata +2 -3
- data/lib/capistrano/tasks/fishpig.rake +0 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcc222d9e3fc341f69b780d94f5179850bee32fc6fbf9d5ca21872eace7a72a4
|
4
|
+
data.tar.gz: 1f0aa60540f6c2b1d3d0e23200d46f6543b0c1f1f63bf42210b070c09b85efef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df41ec7d95247860cf3cd56661457fba36053378d1c4b1f600324f3a4c352183c3321555ba51b332576507c8e7df95e9ef9e9ecb80e9919fd9dbde3e5d8c2a11
|
7
|
+
data.tar.gz: 34beb143b6d773664423c93361df841495625aabacaff27e0ae17fe4cc74a94ec711f03b89ea65270fe8d025758e5b52e05914c059df89f0666c7fb638e2c4fc
|
data/CHANGELOG.md
CHANGED
@@ -21,6 +21,22 @@ Given a version number MAJOR.MINOR.PATCH, increment the:
|
|
21
21
|
|
22
22
|
## [Unreleased]
|
23
23
|
|
24
|
+
## [v1.6.0] - 2022-06-18
|
25
|
+
### Added
|
26
|
+
- Ability to copy over multiple themes and specify their name.
|
27
|
+
|
28
|
+
### Changed
|
29
|
+
- Removed `--no-suggest` from composer commands
|
30
|
+
|
31
|
+
### Removed
|
32
|
+
- Fishpig rake file
|
33
|
+
- WordPress twentytwentytwo theme now deleted by default.
|
34
|
+
|
35
|
+
### Fixed
|
36
|
+
- Fixed the order of reindex and cache flush.
|
37
|
+
- Fixed patch.log permissions if it exists.
|
38
|
+
|
39
|
+
|
24
40
|
## [v1.5.1] - 2022-02-23
|
25
41
|
### Changed
|
26
42
|
- Reverted change to magento:patches:apply
|
data/README.md
CHANGED
@@ -18,9 +18,9 @@ set :linked_dirs, fetch(:linked_dirs, []).push(
|
|
18
18
|
)
|
19
19
|
|
20
20
|
# Composer defaults
|
21
|
-
set :composer_flags, '--no-dev --optimize-autoloader --prefer-dist --no-interaction
|
22
|
-
set :composer_dev_flags, '--prefer-dist --no-interaction
|
23
|
-
set :composer_require_flags, '--update-no-dev --optimize-autoloader --prefer-dist
|
21
|
+
set :composer_flags, '--no-dev --optimize-autoloader --prefer-dist --no-interaction'
|
22
|
+
set :composer_dev_flags, '--prefer-dist --no-interaction'
|
23
|
+
set :composer_require_flags, '--update-no-dev --optimize-autoloader --prefer-dist'
|
24
24
|
set :composer_require_dev_flags, '--optimize-autoloader --prefer-dist'
|
25
25
|
|
26
26
|
# DB defaults
|
@@ -31,9 +31,10 @@ set :keep_backups, fetch(:keep_backups, 10)
|
|
31
31
|
|
32
32
|
# WordPress integration defaults
|
33
33
|
set :wp_backup, fetch(:wp_backup, true)
|
34
|
-
set :wp_delete_themes, fetch(:wp_delete_themes, 'twentyseventeen twentynineteen twentytwenty twentytwentyone')
|
34
|
+
set :wp_delete_themes, fetch(:wp_delete_themes, 'twentyseventeen twentynineteen twentytwenty twentytwentyone twentytwentytwo')
|
35
35
|
set :wp_delete_plugins, fetch(:wp_delete_plugins, 'hello')
|
36
36
|
set :wp_disable_plugins, fetch(:wp_disable_plugins, '')
|
37
|
+
set :wp_copy_themes, fetch(:wp_copy_themes, 'fishpig')
|
37
38
|
|
38
39
|
# Slack defaults
|
39
40
|
set :slack_channel, fetch(:slack_channel, '#deployments')
|
@@ -11,7 +11,6 @@ load File.expand_path('../tasks/composer.rake', __FILE__)
|
|
11
11
|
load File.expand_path('../tasks/sozo.rake', __FILE__)
|
12
12
|
load File.expand_path('../tasks/slack.rake', __FILE__)
|
13
13
|
load File.expand_path('../tasks/db.rake', __FILE__)
|
14
|
-
load File.expand_path('../tasks/fishpig.rake', __FILE__)
|
15
14
|
load File.expand_path('../tasks/magento2.rake', __FILE__)
|
16
15
|
load File.expand_path('../tasks/provision.rake', __FILE__)
|
17
16
|
load File.expand_path('../tasks/server.rake', __FILE__)
|
@@ -37,7 +36,7 @@ after 'deploy:updated', 'magento:setup:static-content:deploy'
|
|
37
36
|
after 'deploy:updated', 'provision:permissions'
|
38
37
|
|
39
38
|
after 'deploy:finishing', 'sozo:symlink'
|
40
|
-
after 'deploy:finishing', '
|
39
|
+
after 'deploy:finishing', 'wordpress:copy_themes'
|
41
40
|
after 'deploy:finishing', 'wordpress:sozo_mu'
|
42
41
|
after 'deploy:finishing', 'wordpress:cleanup'
|
43
42
|
after 'deploy:finishing', 'sozo:optimise'
|
@@ -292,4 +292,15 @@ namespace :magento do
|
|
292
292
|
end
|
293
293
|
end
|
294
294
|
|
295
|
+
namespace :fishpig do
|
296
|
+
desc 'Create and install Fishpig WordPress theme'
|
297
|
+
task :create_theme do
|
298
|
+
on release_roles :all do
|
299
|
+
within release_path do
|
300
|
+
execute :php, '-f', 'magento/bin/magento', 'fishpig:wordpress:build-theme', '--install-path=magento/wp'
|
301
|
+
end
|
302
|
+
end
|
303
|
+
end
|
304
|
+
end
|
305
|
+
|
295
306
|
end
|
@@ -15,9 +15,15 @@ namespace :provision do
|
|
15
15
|
execute :sudo, "find", "#{release_path}/magento", '-type d -print0 | sudo xargs --no-run-if-empty --null --max-procs=0 chmod 770'
|
16
16
|
execute :sudo, "find", "#{release_path}/magento", '-type f -print0 | sudo xargs --no-run-if-empty --null --max-procs=0 chmod 660'
|
17
17
|
|
18
|
+
# Magento bin permissions update
|
18
19
|
if test("[ -f #{release_path}/magento/bin/magento ]")
|
19
20
|
execute :sudo, "chmod", "+x", "#{release_path}/magento/bin/magento"
|
20
21
|
end
|
22
|
+
|
23
|
+
# patch.log permission check
|
24
|
+
if test("[ -f #{deploy_to}/shared/magento/var/log/patch.log ]")
|
25
|
+
execute :sudo, "chmod", "0664", "#{deploy_to}/shared/magento/var/log/patch.log"
|
26
|
+
end
|
21
27
|
|
22
28
|
execute :sudo, "find", "#{release_path}/magento", '-print0 | sudo xargs --no-run-if-empty --null --max-procs=0 chown', "#{fetch(:username)}:#{fetch(:group)}"
|
23
29
|
|
@@ -32,7 +38,7 @@ namespace :provision do
|
|
32
38
|
on roles :app do
|
33
39
|
info ("Checking for setup directory - #{release_path}/magento/setup")
|
34
40
|
|
35
|
-
if test("[ -d #{release_path}/magento/setup
|
41
|
+
if test("[ -d #{release_path}/magento/setup ]")
|
36
42
|
else
|
37
43
|
upload! "#{fetch(:magento_dir)}/setup", "#{release_path}/magento/", recursive: true
|
38
44
|
invoke 'provision:permissions'
|
@@ -26,4 +26,30 @@ namespace :wordpress do
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
+
desc "Copy Wordpress themes across"
|
30
|
+
task :copy_themes do
|
31
|
+
on roles :all do |host|
|
32
|
+
within release_path do
|
33
|
+
if fetch(:wp_copy_themes).length >= 1
|
34
|
+
# Retrieve the themes and split them into an array
|
35
|
+
themes = fetch(:wp_copy_themes).split(" ")
|
36
|
+
compiletheme = false
|
37
|
+
|
38
|
+
# Loop through and create the required theme directories
|
39
|
+
themes.each do |theme|
|
40
|
+
execute :mkdir, "-p", "#{release_path}/magento/wp/wp-content/themes/#{theme}"
|
41
|
+
execute :sudo, 'cp', '-a', "#{release_path}/environments/global/wp/wp-content/themes/#{theme}/.", "#{release_path}/magento/wp/wp-content/themes/#{theme}/"
|
42
|
+
if theme != "fishpig"
|
43
|
+
compiletheme = true
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
if compiletheme
|
48
|
+
invoke 'magento:fishpig:create_theme'
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
29
55
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-sozo_magento2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Clive Walkden
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -47,7 +47,6 @@ files:
|
|
47
47
|
- lib/capistrano/tasks/composer.rake
|
48
48
|
- lib/capistrano/tasks/db.rake
|
49
49
|
- lib/capistrano/tasks/deploy.rake
|
50
|
-
- lib/capistrano/tasks/fishpig.rake
|
51
50
|
- lib/capistrano/tasks/magento2.rake
|
52
51
|
- lib/capistrano/tasks/provision.rake
|
53
52
|
- lib/capistrano/tasks/server.rake
|
@@ -1,16 +0,0 @@
|
|
1
|
-
namespace :fishpig do
|
2
|
-
namespace :setup do
|
3
|
-
desc "Install the Wordpress Fishpig theme"
|
4
|
-
task :install_theme do
|
5
|
-
on roles :all do |host|
|
6
|
-
within release_path do
|
7
|
-
execute :mkdir, "-p", "#{release_path}/magento/wp/wp-content/themes/fishpig"
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
on roles(:all) do
|
12
|
-
execute :sudo, 'cp', '-a', "#{release_path}/environments/global/wp/wp-content/themes/fishpig/.", "#{release_path}/magento/wp/wp-content/themes/fishpig/"
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|