mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 17:56:21 +00:00
22 lines
532 B
Ruby
22 lines
532 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Envía los cambios a través de rsyncd
|
|
class ChangeFullRsyncDestination < ActiveRecord::Migration[6.1]
|
|
def up
|
|
DeployFullRsync.find_each do |deploy|
|
|
Rails.application.nodes.each do |node|
|
|
deploy.destination = "rsync://rsyncd.#{node}/deploys/"
|
|
deploy.save
|
|
end
|
|
end
|
|
end
|
|
|
|
def down
|
|
DeployFullRsync.find_each do |deploy|
|
|
Rails.application.nodes.each do |node|
|
|
deploy.destination = "sutty@#{node}:"
|
|
deploy.save
|
|
end
|
|
end
|
|
end
|
|
end
|