Created
October 13, 2010 19:29
-
-
Save jh3/624706 to your computer and use it in GitHub Desktop.
This file contains 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
# This will search your config/deploy folder for *.rb files | |
# and add the basename without the extension to :stages. | |
# | |
# Now you don't need something like "set :stages, %w(dev prod stage)" | |
set(:stages) do | |
Dir[File.join('config', 'deploy') + '/*.rb'].map do |f| | |
f.match(/[^\/]+?(?=\.[^\/]+$)/)[0] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment