hem-tasks-magento2 2.5.0 → 2.6.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
  SHA1:
3
- metadata.gz: 3c82183b612a27ceaa60fe424594d591c2389d8c
4
- data.tar.gz: 27c059b772bf42fec993f71e62e633b794f15d6e
3
+ metadata.gz: 841dc6c1f37e34c971a3aa959e293eb7775bc291
4
+ data.tar.gz: 546ffd509db49a7cc2ab0bd768fb65da5339e190
5
5
  SHA512:
6
- metadata.gz: 218bf6927ca97d0d56cb9fafe8d7db47fb6f74c813d41fc0a189c4fae06da24c7e6a8e9b9787fa6508a5a97dee85e89a0c0800df591837389d0e5d19be3c9e04
7
- data.tar.gz: ecd3d46a6a91c9dccd398560f9c70b4f949b119e55173777cd90c1f581a73fd64933b1dca6f13bd9ba8a262a5a031f94f12b5b3e90fc5aced2afe06dff435342
6
+ metadata.gz: 41b48bf47d28b4f28c7dca161c5393dc95b34faccfcef49119539d04fbd978aa167b8dd6a7fac3a1522f3550c61aa0f0d7d0ed6de3d2ec86f4e9c587d6bce08d
7
+ data.tar.gz: ba6f9c8a760030d4027a641e2e82a8b8466ef43c381fb5652a9006d340a50f8bff2de01c55121cbcc11de7d52d3f9b88e0e601e5cf184180649d3b2aaf2b4625
@@ -59,20 +59,25 @@ namespace :install do
59
59
  Hem.ui.title 'Setup permissions'
60
60
 
61
61
  magento_binfile = File.join(Hem.project_config.vm.project_mount_path, 'bin', 'magento')
62
- magento_var_directory = File.join(Hem.project_config.vm.project_mount_path, 'var')
63
- magento_media_directory = File.join(Hem.project_config.vm.project_mount_path, 'pub', 'media')
64
- magento_static_directory = File.join(Hem.project_config.vm.project_mount_path, 'pub', 'static')
62
+ chmod_dirs = [
63
+ File.join(Hem.project_config.vm.project_mount_path, 'pub', 'media'),
64
+ File.join(Hem.project_config.vm.project_mount_path, 'pub', 'static')
65
+ ]
66
+ var_directory = File.join(Hem.project_config.vm.project_mount_path, 'var')
67
+
68
+ var_is_bind_mount = run 'grep "/vagrant/var ext4" /proc/mounts || true', capture: true
69
+ chmod_dirs << var_directory if var_is_bind_mount == ''
65
70
 
66
71
  Hem.ui.title "Setup permissions - #{magento_binfile}"
67
72
  run_command "sudo chmod +x #{magento_binfile}", realtime: true, indent: 2
68
73
 
69
- [magento_var_directory].each do |dir|
70
- Hem.ui.title "Setup permissions - #{dir}"
71
- run_command "sudo setfacl -R -m 'u:apache:rwX' -m 'u:vagrant:rwX' '#{dir}'", realtime: true, indent: 2
72
- run_command "sudo setfacl -dR -m 'u:apache:rwX' -m 'u:vagrant:rwX' '#{dir}'", realtime: true, indent: 2
74
+ unless var_is_bind_mount == ''
75
+ Hem.ui.title "Setup permissions - #{var_directory}"
76
+ run_command "sudo setfacl -R -m 'u:apache:rwX' -m 'u:vagrant:rwX' '#{var_directory}'", realtime: true, indent: 2
77
+ run_command "sudo setfacl -dR -m 'u:apache:rwX' -m 'u:vagrant:rwX' '#{var_directory}'", realtime: true, indent: 2
73
78
  end
74
79
 
75
- [magento_media_directory, magento_static_directory].each do |dir|
80
+ chmod_dirs.each do |dir|
76
81
  Hem.ui.title "Setup permissions - #{dir}"
77
82
  run_command "if [ -e '#{dir}' ]; then sudo find '#{dir}' -type d -exec chmod a+rwx {} + ; fi",
78
83
  realtime: true,
@@ -1,7 +1,7 @@
1
1
  module Hem
2
2
  module Tasks
3
3
  module Magento2
4
- VERSION = '2.5.0'.freeze
4
+ VERSION = '2.6.0'.freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hem-tasks-magento2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Norbert Nagy