railman-deployment 2.0.14 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ee17b24136d2a2b8cec6de0942f67ce1b60c75117236eb69cac02ed85accb352
4
- data.tar.gz: 75f5e68a3cc4a2d3852a8ef6c0129c5c7b3b7d914471dee5524fa5bd7dc34268
3
+ metadata.gz: 910a2b1b2539484221207ad7fc1197afc14c04db70425a542a11ea7ca161f307
4
+ data.tar.gz: 7c46eb2c5c19587884189e795b769363eac0545d4a73cd8958a0cd9cbbef19dd
5
5
  SHA512:
6
- metadata.gz: 6c20f99cb35c4907c8c453b5381e4f541e11eb865ef729c068ec6084fa24341d16c2b709fcf1147f2b71336f4cfd20686c54ca61e19b70af76ae41e669ae44d2
7
- data.tar.gz: a2e3fd0b9225ba7d1f51f710654bbb3ec04bd948293d6923f42a18917dd34fb23ea1ce93d67fbad46d76e41ea5777e1a9a2481dd680175945334daf0a9f3a58e
6
+ metadata.gz: f0e1db881c56b002632609e399cc37d258bd641f36a5c0598aa2ccfd17ea9326624ab3807efaa66f3211b4639895812f5ff29abb28b310af5e309820bd1172fa
7
+ data.tar.gz: f795aee9aa04af04972d50d41086b06ed10c406316114d2c5e1df8332fdf2cca85b072ec1a291e4a868e9ef746517906f0b9b73123e3f99b4334f0cc31339838
@@ -1,3 +1,3 @@
1
1
  module RailmanDeployment
2
- VERSION = '2.0.14'
2
+ VERSION = '2.1.0'
3
3
  end
@@ -11,7 +11,7 @@ task :setup do
11
11
  server_conf_dir = "#{fetch(:deploy_to)}/config/server"
12
12
  execute :su_cp, "#{server_conf_dir}/puma.service /lib/systemd/system/#{fetch(:application)}.service"
13
13
  execute :su_cp, "#{server_conf_dir}/sidekiq.service /lib/systemd/system/#{fetch(:application)}_sidekiq.service"
14
- execute :su_ln, "-s -f #{server_conf_dir}/logrotate.conf /etc/logrotate.d/#{fetch(:application)}"
14
+ execute :su_cp, "#{server_conf_dir}/logrotate.conf /etc/logrotate.d/#{fetch(:application)}"
15
15
  within fetch(:deploy_to) do
16
16
  upload! './config/master.key', "#{fetch(:deploy_to)}/config/master.key"
17
17
  execute :bundle, :install, '--without development test'
@@ -95,16 +95,24 @@ task :update do
95
95
  invoke :sync_local_dirs_from_server
96
96
  end
97
97
 
98
+ task :sync_local_dirs_to_server do
99
+ on roles(:all) do
100
+ fetch(:sync_dirs, []).each do |sync_dir|
101
+ if File.exists?("./#{sync_dir}")
102
+ run_locally do
103
+ execute "rsync -avz --delete -e ssh ./#{sync_dir}/ #{fetch(:user)}@#{fetch(:server)}:#{fetch(:deploy_to)}/#{sync_dir}/"
104
+ end
105
+ end
106
+ end
107
+ end
108
+ end
109
+
98
110
  task :sync_local_dirs_from_server do
99
111
  on roles(:all) do
100
- with fetch(:environment) do
101
- within fetch(:deploy_to) do
102
- fetch(:sync_dirs, []).each do |sync_dir|
103
- if test "[ -d #{fetch(:deploy_to)}/#{sync_dir} ]"
104
- run_locally do
105
- execute "rsync -avzm --delete --force -e ssh #{fetch(:user)}@#{fetch(:server)}:#{fetch(:deploy_to)}/#{sync_dir}/ ./#{sync_dir}/"
106
- end
107
- end
112
+ fetch(:sync_dirs, []).each do |sync_dir|
113
+ if test "[ -d #{fetch(:deploy_to)}/#{sync_dir} ]"
114
+ run_locally do
115
+ execute "rsync -avzm --delete --force -e ssh #{fetch(:user)}@#{fetch(:server)}:#{fetch(:deploy_to)}/#{sync_dir}/ ./#{sync_dir}/"
108
116
  end
109
117
  end
110
118
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railman-deployment
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.14
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Jancev