xcode 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/xcode/tasks.rb +8 -4
- data/xcode.gemspec +1 -1
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0
|
1
|
+
0.1.0
|
data/lib/xcode/tasks.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
require 'fspath'
|
2
|
+
require 'shellwords'
|
3
|
+
require 'tempfile'
|
2
4
|
|
3
5
|
module Xcode
|
4
6
|
class Tasks
|
@@ -32,7 +34,9 @@ module Xcode
|
|
32
34
|
desc 'pack'
|
33
35
|
task :pack do
|
34
36
|
pkg_dir = FSPath('pkg')
|
35
|
-
|
37
|
+
pkg_dir.mkpath
|
38
|
+
pack_name = "#{project.name}-#{project.version}"
|
39
|
+
pack_path = pkg_dir + "#{pack_name}.tbz"
|
36
40
|
if pack_path.exist?
|
37
41
|
abort "#{pack_path} already exists"
|
38
42
|
else
|
@@ -45,10 +49,10 @@ module Xcode
|
|
45
49
|
products << objects[reference]['path']
|
46
50
|
end
|
47
51
|
end
|
52
|
+
products = products.map{ |product| FSPath('build') / project.configuration / product }.select(&:exist?)
|
48
53
|
|
49
|
-
arguments = %
|
50
|
-
arguments += products
|
51
|
-
arguments << pack_path
|
54
|
+
arguments = %W[tar -cjf #{pack_path}]
|
55
|
+
arguments += products
|
52
56
|
|
53
57
|
sh *arguments
|
54
58
|
end
|
data/xcode.gemspec
CHANGED
metadata
CHANGED