Make the time format customizable

This commit is contained in:
Mike Foley
2014-04-09 14:42:46 -07:00
parent f10e66b69a
commit 207023eb42
2 changed files with 15 additions and 2 deletions
+5 -1
View File
@@ -9,7 +9,11 @@ module Capistrano
end
def git_tag_for(stage)
"#{stage}-#{Time.new.utc.strftime('%Y.%m.%d-%H%M%S-utc')}"
"#{stage}-#{formatted_time}"
end
def formatted_time
Time.new.utc.strftime(fetch(:deploytag_time_format, "%Y.%m.%d-%H%M%S-utc"))
end
def safe_run(*args)