Skip to content

Commit

Permalink
Installs gems when it should too now.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcparker committed Dec 25, 2009
1 parent 6f24dab commit 92d4d8f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions post-receive-script
Expand Up @@ -38,7 +38,6 @@ if File.exists?(app_dir)
system("rm config/production.yml")
system("git --git-dir=.git checkout -- config/production.yml")
system("git --git-dir=.git pull")
system("echo production > RACK_ENV")

# Integrate new config data and rewrite file
YAML.write_defaults_to_file("/home/git/apps/#{domain}/config/production.yml", cilantro_config)
Expand All @@ -49,11 +48,12 @@ else
system("mkdir log")
system("chmod 777 log")
YAML.write_defaults_to_file("/home/git/apps/#{domain}/config/production.yml", YAML.load_file("/home/git/defaults/production.yml"))
system("echo production > RACK_ENV")
end
system("echo production > RACK_ENV")

ENV['GIT_DIR'] = "/home/git/repositories/#{domain}.git"
if latest_commit
commits_included_gems = !!(`git whatchanged #{latest_commit ? latest_commit+'..HEAD ' : ''}| grep -E "\\W+M\\W+.gems"`.chomp =~ /\.gems/)
commits_included_gems = !!(`git whatchanged #{latest_commit ? latest_commit+'..HEAD ' : ''}| grep -E "\\W+(?:M|A)\\W+.gems"`.chomp =~ /\.gems/)
commits_included_migration = !!(`git whatchanged #{latest_commit ? latest_commit+'..HEAD ' : ''}| grep -E "\\<A\\>\\W+\\<config/migrations"`.chomp =~ /config\/migrations\/.+\.rb/)
else
commits_included_gems = commits_included_migration = true
Expand Down

0 comments on commit 92d4d8f

Please sign in to comment.