That's not going to match the release name that capistrano chose, right? Seems like you'd want to use latest_release or something.
set :branch do
default_tag = `git tag`.split("\n").last
tag = Capistrano::CLI.ui.ask "Tag to deploy (make sure to push the tag first): [#{default_tag}] "
tag = default_tag if tag.empty?
tag
endMy code won't be appropriate if you don't use master/staging/production branches, either.