Browse files

more fixing on the release number business

  • Loading branch information...
1 parent 56c5656 commit 2fc390621a71706177d3dc769eb9304a829893fd @aross aross committed Feb 13, 2012
Showing with 5 additions and 3 deletions.
  1. +0 −1 app/views/layouts/_header.html.erb
  2. +3 −0 config/deploy.rb
  3. +2 −2 config/environments/production.rb
View
1 app/views/layouts/_header.html.erb
@@ -1,4 +1,3 @@
-<!-- HOST: <%= ENV['APP_SERVER'] %> -->
<div id="header" class="clearfix">
<div class="bar">
View
3 config/deploy.rb
@@ -52,6 +52,9 @@
run "ln -s #{deploy_to}/#{shared_dir}/files/screencast.mp4 #{current_release}/public/screencast.mp4"
run "ln -s #{deploy_to}/#{shared_dir}/files/facebook.yml #{current_release}/config/"
# sudo "chown -R mongrel:admins #{current_release}"
+
+ # setting the global RELEASE_NUMBER was not working on app1 so we're going to replace the value here
+ run "perl -pi -e 's/RELEASE_NUMBER/#{current_revision[0..7]}/g' #{current_release}/config/environments/production.rb"
end
desc "Compile CSS & JS for public/assets/ (see assets.yml)"
View
4 config/environments/production.rb
@@ -12,11 +12,11 @@
# config.action_controller.asset_host = "http://assets.example.com"
# Use the git revision of this release
- ENV['RELEASE_NUMBER'] = %x{cat REVISION | cut -c -7}.rstrip
+ # RELEASE_NUMBER = %x{cat REVISION | cut -c -7}.rstrip
# Enable serving of images, stylesheets, and javascripts from CloudFront
config.action_controller.asset_host = Proc.new {
- |source, request| "#{request.ssl? ? 'https' : 'http'}://d1f0ywl7f2vxwh.cloudfront.net/r-#{ENV['RELEASE_NUMBER']}"
+ |source, request| "#{request.ssl? ? 'https' : 'http'}://d1f0ywl7f2vxwh.cloudfront.net/r-RELEASE_NUMBER"
}
# Disable delivery errors, bad email addresses will be ignored

0 comments on commit 2fc3906

Please sign in to comment.