cocoapods-rome 0.0.1 → 0.0.2

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: e2074ce61f9095239ccfe5a4654432a6dbf80e2e
4
- data.tar.gz: fcdd790c5b522cb25c0b615cdce25336521c7736
3
+ metadata.gz: d523c6c9b96531f2ba2582a3f61fc96a9330d113
4
+ data.tar.gz: 30ba554b94c363a2edd2bab17ad166651a8dfeba
5
5
  SHA512:
6
- metadata.gz: 3c8164ea5b2b22ec0eea56aedca979f2bf5b8a1868e8ff8dad53024b33ef65eb1a4cfb9a0a4e62726ea3c621dbd5ff86b20b7860b982428fb500debf8941f781
7
- data.tar.gz: ca3249832806aa99d54805c7f4720969fd8b3062597f48b644562f3d2a9165cdffe5b957e9a39ed3cb6f0842c1e642f2acbec90b71fd86e4a1e79178c34199b6
6
+ metadata.gz: a8267a32339a128c9fc4f1126f9cc133fb24795a0757945329a43f9228263065df772613a99d894044bdd81a6e082df8f0c93478b79b09ea7fac51fa2cff2760
7
+ data.tar.gz: e65a748ddbb70fe16ff678b7ea18234934abe21ddedbd3b15f87353694761704cdd3aa8ddb27b248694bbee0636eb865a85b14e71f1aacc05a52084aaaee68d4
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # cocoapods-rome
2
2
 
3
+ ![](yolo.jpg)
4
+
3
5
  Rome makes it easy to build a list of frameworks for consumption outside of
4
6
  Xcode, e.g. for a Swift script.
5
7
 
@@ -1,3 +1,3 @@
1
1
  module CocoapodsRome
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1,17 +1,32 @@
1
-
2
1
  Pod::HooksManager.register('cocoapods-rome', :post_install) do |installer_context|
3
- sandbox_root = installer_context.sandbox_root
4
- sandbox = Pod::Sandbox.new(sandbox_root)
2
+ sandbox_root = Pathname(installer_context.sandbox_root)
3
+ sandbox = Pod::Sandbox.new(sandbox_root)
4
+
5
+ build_dir = sandbox_root.parent + 'build'
6
+ destination = sandbox_root.parent + 'Rome'
7
+
8
+ Pod::UI.puts 'Building frameworks'
9
+
10
+ build_dir.rmtree if build_dir.directory?
11
+ Dir.chdir(sandbox.project_path.dirname) do
12
+ targets = installer_context.umbrella_targets.select { |t| t.specs.any? }.map(&:cocoapods_target_label)
13
+ targets.each do |target|
14
+ Pod::Executable.execute_command 'xcodebuild', %(-project #{sandbox.project_path.basename} -scheme #{target} -configuration Release), true
15
+ end
16
+ end
17
+
18
+ raise Pod::Informative 'The build directory was not found in the expected location.' unless build_dir.directory?
5
19
 
6
- puts 'Building frameworks'
20
+ frameworks = Pathname.glob(build_dir + 'Release*/Pods*/*.framework')
21
+ frameworks_by_target = frameworks.group_by { |f| f.to_s =~ %r{build/Release[^/]*/Pods-?([^/]*)/} && destination + $1 }
7
22
 
8
- FileUtils.rmtree('build')
9
- Dir.chdir(sandbox.project_path.dirname) do
10
- `xcodebuild -project #{sandbox.project_path.basename} -scheme Pods -configuration Release`
11
- end
23
+ Pod::UI.puts "Built #{frameworks.count} #{'frameworks'.pluralize(frameworks.count)}"
24
+ Pod::UI.puts "Copying frameworks to `#{destination.relative_path_from Pathname.pwd}`"
12
25
 
13
- `mv build/Release/Pods/*.framework build`
14
- FileUtils.rmtree('build/Pods.build')
15
- FileUtils.rmtree('build/Release')
16
- `mv build Rome`
26
+ destination.rmtree if destination.directory?
27
+ frameworks_by_target.each do |dest, frameworks|
28
+ FileUtils.mkdir_p dest
29
+ FileUtils.cp_r frameworks, dest, :remove_destination => true
30
+ end
31
+ build_dir.rmtree if build_dir.directory?
17
32
  end
@@ -1 +1 @@
1
- require 'cocoapods-rome/post_install.rb'
1
+ require 'cocoapods-rome/post_install'
data/yolo.jpg ADDED
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-rome
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris Bügling
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-21 00:00:00.000000000 Z
11
+ date: 2015-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -57,6 +57,7 @@ files:
57
57
  - lib/cocoapods-rome/post_install.rb
58
58
  - lib/cocoapods_plugin.rb
59
59
  - spec/spec_helper.rb
60
+ - yolo.jpg
60
61
  homepage: https://github.com/EXAMPLE/cocoapods-rome
61
62
  licenses:
62
63
  - MIT