Sha256: 347add148b77af9cde35021500929bc97dfcef2bdea86efb6b4ab429447e612f
Contents?: true
Size: 1.12 KB
Versions: 2
Compression:
Stored size: 1.12 KB
Contents
namespace "wp-capistrano" do desc 'Install plugins dependencies using composer' task :plugins_composer_install do on roles(:app) do pluginDirectory = "#{release_path}/wp-content/plugins/" Dir.foreach(pluginDirectory) { |directory| if (directory != "." and directory != "..") puts "#################################\n# Plugin #{directory}\n#################################" Dir.chdir(pluginDirectory + directory) do puts if (Dir.exist?(Dir.pwd + '/vendor') == false && File.exist?(Dir.pwd + '/composer.lock') == true) puts '=> NEED INSTALL : There is no vendor installed and composer.lock' execute "ls #{release_path}/wp-content/plugins/" execute "composer install --working-dir=#{release_path}/wp-content/plugins/" + directory else puts '=> NO NEED INSTALL' end end puts ' ' end } puts "#################################\n#End Install Plugins\n#################################" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
wp-capistrano3-0.0.29 | lib/capistrano/tasks/plugins_composer_install.rake |
wp-capistrano3-0.0.28 | lib/capistrano/tasks/plugins_composer_install.rake |