fastlane-plugin-carthage_cache_ftps 0.3.0 → 0.3.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7b39f321cce2eab40182c4891069964b46fd283
|
4
|
+
data.tar.gz: 9b6c0ffb1ff1865779004b0bc1a7f2aa3d465ba2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29305f73d735dfca80db2ee40a538fe64d259d7a2f1ce113014b2da9dca68262fe0b6c20df37058afb869f15bd698f3c0de02b7ad02458d5d06bdf4115aeea21
|
7
|
+
data.tar.gz: 38668daf07134fa56219e182be8309f4271254d0a0fd4fc550989fa17e07baba3a28046644ab2a0856673b5d9315a9d4310e2a831dcd15f1170ca77fc2e6c9e1
|
@@ -31,7 +31,13 @@ class FTPRepository
|
|
31
31
|
end
|
32
32
|
files = ftps.list
|
33
33
|
ftps.close
|
34
|
-
|
34
|
+
|
35
|
+
if files.select { |f| f.include? archive_filename.to_s }.empty?
|
36
|
+
return false
|
37
|
+
else
|
38
|
+
puts "Remote File already exists"
|
39
|
+
return true
|
40
|
+
end
|
35
41
|
end
|
36
42
|
|
37
43
|
def download(archive_filename, destination_path)
|
@@ -43,8 +49,18 @@ class FTPRepository
|
|
43
49
|
def upload(archive_filename, archive_path)
|
44
50
|
ftps = connection
|
45
51
|
files = ftps.list
|
46
|
-
|
47
|
-
|
52
|
+
|
53
|
+
if files.select { |f| f.include? @ftps_remote_path }.empty?
|
54
|
+
ftps.mkdir(@ftps_remote_path)
|
55
|
+
end
|
56
|
+
|
57
|
+
remote_path = "#{@ftps_remote_path}/#{archive_filename}"
|
58
|
+
if files.select { |f| f.include? remote_path }.empty?
|
59
|
+
ftps.putbinaryfile(archive_path, remote_path)
|
60
|
+
else
|
61
|
+
puts "File #{remote_path} already exists"
|
62
|
+
end
|
63
|
+
|
48
64
|
ftps.close
|
49
65
|
end
|
50
66
|
end
|