Skip to content

Commit

Permalink
more fixing on the release number business
Browse files Browse the repository at this point in the history
  • Loading branch information
aross committed Feb 14, 2012
1 parent 56c5656 commit 2fc3906
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion app/views/layouts/_header.html.erb
@@ -1,4 +1,3 @@
<!-- HOST: <%= ENV['APP_SERVER'] %> -->
<div id="header" class="clearfix"> <div id="header" class="clearfix">


<div class="bar"> <div class="bar">
Expand Down
3 changes: 3 additions & 0 deletions config/deploy.rb
Expand Up @@ -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/screencast.mp4 #{current_release}/public/screencast.mp4"
run "ln -s #{deploy_to}/#{shared_dir}/files/facebook.yml #{current_release}/config/" run "ln -s #{deploy_to}/#{shared_dir}/files/facebook.yml #{current_release}/config/"
# sudo "chown -R mongrel:admins #{current_release}" # 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 end


desc "Compile CSS & JS for public/assets/ (see assets.yml)" desc "Compile CSS & JS for public/assets/ (see assets.yml)"
Expand Down
4 changes: 2 additions & 2 deletions config/environments/production.rb
Expand Up @@ -12,11 +12,11 @@
# config.action_controller.asset_host = "http://assets.example.com" # config.action_controller.asset_host = "http://assets.example.com"


# Use the git revision of this release # 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 # Enable serving of images, stylesheets, and javascripts from CloudFront
config.action_controller.asset_host = Proc.new { 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 # Disable delivery errors, bad email addresses will be ignored
Expand Down

0 comments on commit 2fc3906

Please sign in to comment.