Created
April 28, 2011 16:01
-
-
Save proffalken/946634 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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