Skip to content
Browse files

Set WP_Stage in wp-config.php, so people can do logic based on stage

  • Loading branch information...
1 parent 6502317 commit 6c49d1db1dca6a797ec21420a40374df84fa7ab6 @markjaquith committed Jun 6, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/tasks.rb
View
4 lib/tasks.rb
@@ -66,9 +66,9 @@
end
end
end
- desc "Sets the database credentials in wp-config.php"
+ desc "Sets the database credentials (and other settings) in wp-config.php"
task :make_config do
- {:'%%DB_NAME%%' => wpdb[stage][:name], :'%%DB_USER%%' => wpdb[stage][:user], :'%%DB_PASSWORD%%' => wpdb[stage][:password], :'%%DB_HOST%%' => wpdb[stage][:host]}.each do |k,v|
+ {:'%%WP_STAGE%%' => stage, :'%%DB_NAME%%' => wpdb[stage][:name], :'%%DB_USER%%' => wpdb[stage][:user], :'%%DB_PASSWORD%%' => wpdb[stage][:password], :'%%DB_HOST%%' => wpdb[stage][:host]}.each do |k,v|
run "sed -i 's/#{k}/#{v}/' #{release_path}/wp-config.php", :roles => :web
end
end

0 comments on commit 6c49d1d

Please sign in to comment.
Something went wrong with that request. Please try again.