Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save firecentaur/bef50a1819b3a2aafde7dc8cef6be1c2 to your computer and use it in GitHub Desktop.
Save firecentaur/bef50a1819b3a2aafde7dc8cef6be1c2 to your computer and use it in GitHub Desktop.
node[:deploy].each do |application, deploy|
next unless application.match('frontend')
backendLocation = application.sub('frontend', 'backend')
log 'message' do
message 'backendLocation is #{backendLocation}'
level :info
end
execute 'run tagindex delete' do
command 'php yiic tagIndex delete'
cwd '/srv/www/#{backendLocation}/current/protected'
end
execute 'run tagindex map' do
command 'php yiic tagIndex map'
cwd '/srv/www/#{backendLocation}/current/protected'
end
execute 'run tagindex index' do
command 'php yiic tagIndex'
cwd '/srv/www/#{backendLocation}/current/protected'
end
execute 'run videoindex delete' do
command 'php yiic videoindex delete'
cwd '/srv/www/#{backendLocation}/current/protected'
end
execute 'run videoindex map' do
command 'php yiic videoindex map'
cwd '/srv/www/#{backendLocation}/current/protected'
end
execute 'run videoindex index' do
command 'php yiic videoindex'
cwd '/srv/www/#{backendLocation}/current/protected'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment