fastlane-plugin-carthage_cache_ftps 0.1.3 → 0.2.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
  SHA1:
3
- metadata.gz: 958099796491c60baa9a025946f3a9ba5b93780a
4
- data.tar.gz: 886efc29362b1090a3e991c9fa733e2a61e17d32
3
+ metadata.gz: 802269f867a7261db7acaf714b3957b90edb53ff
4
+ data.tar.gz: 830e512786a52f1aaf7e242ea3bcbb3ebce0437e
5
5
  SHA512:
6
- metadata.gz: 27b42a1ed8695f21c59c8d8ea7d19542a7b2666c425fa8bc316456378df3f80e59f6f26c38889b8e5a2874182f77b0a3a9e2ebf1e77fe0e19dcff682334b172a
7
- data.tar.gz: 82cb326aa8f3680a65a96091973a949889fdfd45b64d9599afaff969d6a0ab77730eabfbf7cecb2852674ab4842050d01f54559fa6aa408c0e5486dfa845f2d4
6
+ metadata.gz: 7b3d162c2bc42afe0c9e48015ff9d366daafddd1ef089e27d260619a74cab3255b40e652b527e9a5b38ecf57b570d524d192695a7f549b28f5b6da59a6a0570e
7
+ data.tar.gz: edaf10b71585d08141acfec9e05f64a8b0bfabeddd24682159c2163a09b1466cc13aa1b38370d1462921765928420c8736dbc5dff5b1c903f4050a98281b1ed1
@@ -21,11 +21,9 @@ module Fastlane
21
21
  }
22
22
  }
23
23
 
24
- local_path = params.values[:local_path]
25
- application = CarthageCache::Application.new(local_path, true, config, repository: FTPRepository)
26
-
27
- puts application.inspect
28
-
24
+ project_directory = params.values[:project_directory]
25
+ application = CarthageCache::Application.new(project_directory, true, config, repository: FTPRepository)
26
+
29
27
  command = params.values[:command]
30
28
 
31
29
  case command.to_sym
@@ -92,9 +90,9 @@ module Fastlane
92
90
  type: String,
93
91
  default_value: "carthage_cache",
94
92
  short_option: "f"),
95
- FastlaneCore::ConfigItem.new(key: :local_path,
96
- env_name: "CARTHAGE_CACHE_FTPS_LOCAL_PATH",
97
- description: "The path to the folder containing the 'Carthage' folder",
93
+ FastlaneCore::ConfigItem.new(key: :project_directory,
94
+ env_name: "FL_CARTHAGE_PROJECT_DIRECTORY",
95
+ description: "Define the directory containing the Carthage project",
98
96
  optional: true,
99
97
  type: String,
100
98
  default_value: ".",
@@ -24,9 +24,14 @@ class FTPRepository
24
24
 
25
25
  def archive_exist?(archive_filename)
26
26
  ftps = login
27
+ begin
28
+ ftps.chdir(@ftps_remote_path)
29
+ rescue
30
+ return false
31
+ end
27
32
  files = ftps.list
28
33
  ftps.close
29
- return !files.select { |f| f.include? "#{@ftps_remote_path}/#{archive_filename}" }.empty?
34
+ return !files.select { |f| f.include? "#{archive_filename}" }.empty?
30
35
  end
31
36
 
32
37
  def download(archive_filename, destination_path)
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module CarthageCacheFtps
3
- VERSION = "0.1.3"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-carthage_cache_ftps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wolfgang Lutz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-13 00:00:00.000000000 Z
11
+ date: 2017-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: carthage_cache
@@ -131,7 +131,6 @@ files:
131
131
  - LICENSE
132
132
  - README.md
133
133
  - lib/fastlane/plugin/carthage_cache_ftps.rb
134
- - lib/fastlane/plugin/carthage_cache_ftps/actions/carthage_cache_action.rb
135
134
  - lib/fastlane/plugin/carthage_cache_ftps/actions/carthage_cache_ftps_action.rb
136
135
  - lib/fastlane/plugin/carthage_cache_ftps/helper/carthage_cache_ftps_helper.rb
137
136
  - lib/fastlane/plugin/carthage_cache_ftps/helper/ftp_repository.rb
@@ -1,57 +0,0 @@
1
- require 'carthage_cache'
2
-
3
- module Fastlane
4
- module Actions
5
- class CarthageCacheAction < Action
6
- def self.run(params)
7
- FastlaneCore::PrintTable.print_values(config: params, title: "Summary for Carthage Cache")
8
-
9
- application = CarthageCache::Application.new(".", true, {})
10
-
11
- command = params.values[:command]
12
-
13
- case command.to_sym
14
- when :install
15
- exit 1 unless application.install_archive
16
- when :publish
17
- exit 1 unless application.create_archive
18
- end
19
- end
20
-
21
- def self.description
22
- "Allows to publish or install the carthage builds to AWS to avoid recompilation. Needs a configuration created by 'carthage_cache config'"
23
- end
24
-
25
- def self.authors
26
- ["Wolfgang Lutz"]
27
- end
28
-
29
- def self.return_value
30
- # If your method provides a return value, you can describe here what it does
31
- end
32
-
33
- def self.details
34
- "This action uses the carthage_cache_gem to cache the built carthage libraries remotely on AWS."
35
- end
36
-
37
- def self.available_options
38
- [
39
- FastlaneCore::ConfigItem.new(key: :command,
40
- env_name: "CARTHAGE_CACHE_COMMAND",
41
- description: "The carthage cache command to use. Allowed values: publish, install",
42
- optional: false,
43
- type: String,
44
- default_value: "install",
45
- short_option: "c",
46
- verify_block: proc do |value|
47
- UI.user_error!("Unknown carthage cache command. Allowed: install, publish") unless ["install", "publish"].include?(value)
48
- end)
49
- ]
50
- end
51
-
52
- def self.is_supported?(platform)
53
- [:ios, :mac].include?(platform)
54
- end
55
- end
56
- end
57
- end