autoproj-sync 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/autoproj/sync/remote.rb +18 -1
- data/lib/autoproj/sync/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae7a208c251030df933fb26ca828c40b07b9d9f0f48434496b76edd508900457
|
4
|
+
data.tar.gz: 0c69680306e95808d7cae19f2a4128a7a3523470274b706e5b8d402874510a7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5018e798961061b62918684140aeaaec6a1948938947f84342fd73f059ed4d278d00ba4364e1037d5806c68a4d69d98cbb757df149f096f6c4d4285942617344
|
7
|
+
data.tar.gz: 03e360f81f1b8e7fa5571916f6b2baf77418a28a0be105191e7e1ded83a5eb108138900d1f77e9604e0881a6df6d336c5c12b9400e160d4393766d88a6b55250
|
data/lib/autoproj/sync/remote.rb
CHANGED
@@ -116,7 +116,8 @@ module Autoproj
|
|
116
116
|
File.join(ws.prefix_dir, file)
|
117
117
|
end
|
118
118
|
[*user_files, *ws.env.source_before, *ws.env.source_after,
|
119
|
-
|
119
|
+
*autoproj_files, *bundler_files].
|
120
|
+
find_all { |file| File.exist?(file) }
|
120
121
|
end
|
121
122
|
|
122
123
|
def rsync_target
|
@@ -380,6 +381,22 @@ module Autoproj
|
|
380
381
|
"sync: updating Autoproj configuration files on #{name}",
|
381
382
|
done_message: "sync: updated Autoproj configuration files on #{name}" do
|
382
383
|
autoproj_annex_files(ws).each do |file|
|
384
|
+
missing = []
|
385
|
+
dir = File.join(@uri.path, File.dirname(file))
|
386
|
+
while dir != '/'
|
387
|
+
begin
|
388
|
+
sftp.stat!(dir)
|
389
|
+
break
|
390
|
+
rescue Net::SFTP::StatusException
|
391
|
+
missing.unshift dir
|
392
|
+
dir = File.dirname(dir)
|
393
|
+
end
|
394
|
+
end
|
395
|
+
|
396
|
+
missing.each do |dir|
|
397
|
+
sftp.mkdir!(dir)
|
398
|
+
end
|
399
|
+
|
383
400
|
sftp.upload!(file, File.join(@uri.path, file))
|
384
401
|
end
|
385
402
|
end
|