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 +4 -4
- data/lib/ios_toolchain/tasks/ios/dependencies.rake +48 -0
- data/lib/ios_toolchain/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 528137720c86fc6f5456b5ce52b5c653eeefa1af
|
4
|
+
data.tar.gz: 4508081b1b886563546d72415e743c7554cc6d05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
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
|
+
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-
|
11
|
+
date: 2017-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|