【发布时间】:2014-09-10 19:14:51
【问题描述】:
我正在使用 Capistrano v3,我正在尝试标记部署并将它们推送到 github。
到目前为止我有:
task :tag do
on roles (:app) do
puts "\x1B[35m Tagging deployment... \x1B[0m"
timestamp = Time.now.strftime("%Y_%m_%d_%H_%M_%S")
tag_name = "#{fetch(:stage)}_#{timestamp}"
puts "\x1B[35m tag name... \x1B[0m" + tag_name
execute "cd #{repo_path} && git tag #{tag_name} && git push origin --tags"
puts "\x1B[35m Done. Deployment tagged as #{fetch(:tag_name)} \x1B[0m"
end
end
问题是repo_path 是一个镜像仓库,我当然不能执行或使用--tags,因为它会引发错误。
关于如何完成这个非常简单的任务有什么想法吗?
【问题讨论】:
标签: git ubuntu github tags capistrano3