date time directory name global variable in capistrano

南笙酒味 提交于 2020-01-17 04:46:23

问题


How can I make a datetime global directory variable in Capistrano 3? Basically the scenario is: I want to create that variable before deploy start and make it available to other tasks. The value of the variable is date and time. So that will be used for backup tasks. How is it possible?

Thanks in advance.


回答1:


In your deploy.rb, you can set a variable (set :my_datetime, Time.now) and then use it elsewhere (fetch :my_datetime).



来源:https://stackoverflow.com/questions/34645995/date-time-directory-name-global-variable-in-capistrano

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!