lib/fulmar/infrastructure/model/transfer/rsync_with_versions.rb in fulmar-2.2.3 vs lib/fulmar/infrastructure/model/transfer/rsync_with_versions.rb in fulmar-2.2.4

- old
+ new

@@ -26,11 +26,11 @@ chmod: nil, delete: true }, symlinks: {}, limit_releases: 5, - version_name: Time.now.strftime('%Y-%m-%d_%H%M%S'), + version_name: 'time', shared: [] }.freeze # @param [Fulmar::Domain::Service::ConfigurationService] config def initialize(config) @@ -47,10 +47,12 @@ def prepare super @remote_shell = Fulmar::Shell.new @config[:remote_path], @config.ssh_user_and_host @remote_shell.debug = @config[:debug] - if /^[A-Z][A-Z0-9\-_]+$/ =~ @config[:version_name] + if @config[:version_name] == 'time' + @config[:version_name] = Time.now.strftime(TIME_FOLDER) + elsif /^[A-Z][A-Z0-9\-_]+$/ =~ @config[:version_name] @config[:version_name] = ENV[@config[:version_name]].split('/').last end end # Copy the files via rsync to the release_path on the remote machine