I've already put the following code in my deploy.rb file:
set :base_repository, BASE_REPO_URI
unless variables[:tag] or variables[:branch]
if Dir.getwd =~ /(branche|tag)s\/([^\/]+)/
variables[{'branche' => :branch, 'tag' => :tag}[$1]] = $2
end
end
if variables[:tag]
set :repository, "#{base_repository}/tags/#{variables[:tag]}"
elsif variables[:branch]
set :repository, "#{base_repository}/branches/#{variables[:branch]}"
else
set :repository, "#{base_repository}/trunk"
end
I would like a bit more, however--say something like:
def set_grokable_release(release)
_cset(:release_name) { set :deploy_timestamped, true;
Time.now.utc.strftime("%Y%m%d%H%M%S-#{release}")}
end
if variables[:tag]
set :repository, "#{base_repository}/tags/#{variables[:tag]}"
set_grokable_release("tag-#{variables[:tag]}")
elsif variables[:branch]
set :repository, "#{base_repository}/branches/#{variables[:branch]}"
set_grokable_release("branch-#{variables[:branch]}-
#{variables[:revision]}")
else
set :repository, "#{base_repository}/trunk"
set_grokable_release("trunk-#{variables[:revision]}")
end
Is extending the name of the releases likely to cause trouble? Is
this path worth pursuing at all?
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---