ios_toolchain 0.2.4 → 0.2.6

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: 2a9993e7fb786c7859ea7816426fc8b8a54e30d9
4
- data.tar.gz: 7ba5c05e0a9201899620f08071045ee8dc1993c3
3
+ metadata.gz: 528137720c86fc6f5456b5ce52b5c653eeefa1af
4
+ data.tar.gz: 4508081b1b886563546d72415e743c7554cc6d05
5
5
  SHA512:
6
- metadata.gz: 5920517e606396cddc3de35982cbcbaebffbecf88b72df9727f84972bc02a7e9522f4cf008d2b272d9104a3d3ee90725f7e49712a146c5b8f7b939e43b99cf57
7
- data.tar.gz: 47c5b35fc03ba1fce10cbaab67ed1fee088621b330a21e6ada90eaaacd0532cfb5cf9372cac7ad738ebbfde23d907c544800e0203c33a2f25c8f32afb93c9c40
6
+ metadata.gz: b368adacd43c0e8ef519416aa160463b7cd1410d899ceb9578da90aa5b287f39d0ecbf1ff2a4d2c657ff37b3ba52662b5eeea0cfa0deba889420ef47d38a7da6
7
+ data.tar.gz: 10d439c1f50a2acf25cad420fd62634e24c0a9cefae0d445c7e403bf8e25085cb8dadc345083b167fa56220f425d712669d785987c9bfbee4cd7a87cd1108fb6
@@ -1,5 +1,52 @@
1
1
  namespace :ios do
2
2
  namespace :carthage do
3
+
4
+ carthage_zip_file_name = 'carthage.tar.gz'
5
+ carthage_resolved_file_name = 'Cartfile.resolved'
6
+ carthage_folder_name = 'Carthage'
7
+
8
+ desc 'zipping'
9
+ task :zip, :src_folder, :output_folder do |_, args|
10
+ output_tar_path = File.join(args[:output_folder], carthage_zip_file_name)
11
+
12
+ tar_content = "#{carthage_folder_name} #{carthage_resolved_file_name}"
13
+
14
+ sh("pushd #{args[:src_folder]}; tar -zcf #{output_tar_path} #{tar_content}; popd")
15
+ end
16
+
17
+ desc 'unzipping'
18
+ task :unzip, :input_folder, :output_folder do |_, args|
19
+ input_tar_path = File.join(args[:input_folder], carthage_zip_file_name)
20
+ sh("tar -xzf #{input_tar_path} --directory #{args[:output_folder]}") if File.exists?(input_tar_path)
21
+ end
22
+
23
+ desc 'caching'
24
+ task :use_cached, [:download_folder, :destination_folder] => [:unzip] do |_, args|
25
+ puts '### moving Carthage folder into place from cached download...'
26
+ carthage_folder_path = File.join(args[:download_folder], carthage_folder_name)
27
+ download_cartfile_resolved = File.join(args[:download_folder], carthage_resolved_file_name)
28
+ sh("mv #{carthage_folder_path} #{download_cartfile_resolved} #{args[:destination_folder]}")
29
+ end
30
+
31
+ desc 'smart fetching'
32
+ task :smart_fetch, :src_folder, :download_folder, :output_folder do |_, args|
33
+ puts '### getting Carthage from cache or recreating...'
34
+ source_cartfile_resolved = File.join(args[:src_folder], carthage_resolved_file_name)
35
+ download_cartfile_resolved = File.join(args[:download_folder], carthage_resolved_file_name)
36
+
37
+ Rake::Task['ios:carthage:unzip'].invoke(args[:download_folder], args[:download_folder])
38
+
39
+ sh("diff #{source_cartfile_resolved} #{download_cartfile_resolved}") do |contents_equal, _|
40
+ if contents_equal
41
+ Rake::Task['ios:carthage:use_cached'].invoke(args[:download_folder], args[:output_folder])
42
+ Rake::Task['ios:carthage:zip'].invoke(args[:output_folder], args[:output_folder])
43
+ else
44
+ Rake::Task['ios:carthage:fetch'].invoke()
45
+ Rake::Task['ios:carthage:zip'].invoke(args[:src_folder], args[:output_folder])
46
+ end
47
+ end
48
+ end
49
+
3
50
  desc 'updates our Carthage dependencies to the latest version'
4
51
  task :update do
5
52
  carthage_cmd = []
@@ -7,6 +54,7 @@ namespace :ios do
7
54
  carthage_cmd << 'update'
8
55
  carthage_cmd << '--platform ios'
9
56
  carthage_cmd << '--no-use-binaries'
57
+ carthage_cmd << '--use-ssh'
10
58
  carthage_cmd = carthage_cmd.join(' ')
11
59
 
12
60
  system(carthage_cmd)
@@ -1,3 +1,3 @@
1
1
  module IosToolchain
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ios_toolchain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Schmidt
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-22 00:00:00.000000000 Z
11
+ date: 2017-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler