Skip to content

Instantly share code, notes, and snippets.

@proffalken
Created April 28, 2011 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save proffalken/946634 to your computer and use it in GitHub Desktop.
Save proffalken/946634 to your computer and use it in GitHub Desktop.
namespace :deploy do
desc <<-DESC
Checks the latest version of the libraries
to make sure we're not deploying our code
onto a platform which is not prepared for it
DESC
task :checkdeps do
required_libs.each do | appname,version |
current_version = capture("cat /var/www/#{appname}/application/config/version").strip()
if version.to_f() > current_version.to_f() then
error = CommandError.new("Deployed version of #{appname} (#{current_version}) does not match required version (#{version})")
raise error
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment