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: 8b2ce1a9eea0c1d6cbb8643f46b7ae032d7189f2
4
- data.tar.gz: b86d2094773f68b5c49b0ff33dc8e257c48c2905
3
+ metadata.gz: a7b39f321cce2eab40182c4891069964b46fd283
4
+ data.tar.gz: 9b6c0ffb1ff1865779004b0bc1a7f2aa3d465ba2
5
5
  SHA512:
6
- metadata.gz: fa70455940c78b708a3e7876d08972dee629b08beb956799dff919c66783527c3526fb2985b685e1080d7d58b4bb94fcb20ec1445199d62b306c0a56e035f93e
7
- data.tar.gz: dabc74fbb8960b62247d31551b4d5ba58bfe378e0c836e4f4bdb6969e12d4346ce6b4f367c15955213d6423771f955b849cc3d2fc483b6072bf59d985060b52c
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
- return !files.select { |f| f.include? archive_filename.to_s }.empty?
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
- ftps.mkdir(@ftps_remote_path) if files.select { |f| f.include? @ftps_remote_path }.empty?
47
- ftps.putbinaryfile(archive_path, "#{@ftps_remote_path}/#{archive_filename}")
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
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module CarthageCacheFtps
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-carthage_cache_ftps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wolfgang Lutz