Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow wordpress themes to be installed from zip #660

Merged
merged 2 commits into from
Apr 23, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions cookbooks/wordpress/resources/theme.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,21 @@
user node[:wordpress][:user]
group node[:wordpress][:group]
end
elsif theme_repository.end_with?(".zip")
zip_path = "#{Chef::Config[:file_cache_path]}/#{new_resource.theme}.zip"

remote_file zip_path do
source theme_repository
action :create
end

archive_file zip_path do
destination theme_directory
action :extract
grischard marked this conversation as resolved.
Show resolved Hide resolved
overwrite true
group node[:wordpress][:group]
owner node[:wordpress][:user]
end
else
subversion theme_directory do
action :sync
Expand Down
Loading