xcodebuilder 0.1.9 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/xcode_builder.rb +28 -16
- data/lib/xcode_builder/configuration.rb +0 -6
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9889af066cb47eaf97ece6190a0c7f60b457a09a
|
4
|
+
data.tar.gz: 04a8141f18cacbb6b79df63e799c9d1c986355da
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 924a2a36d141a6d0974e1b89d56741d40f55e9e8cacb7d8ed8779ae224f8f3a65cb09727e5c0dac24309ae063e4226d95f9cd9cd2bbc773185d271011031d9e5
|
7
|
+
data.tar.gz: 1735750f5827d76ed908deb92bd841eb09c7dc1a965911620c9fb2a2ac8e92eafca444a108ca39d857ca7b07ef7fc1ee587e37fbde59c4cc21bd48b743384c25
|
data/lib/xcode_builder.rb
CHANGED
@@ -28,8 +28,7 @@ module XcodeBuilder
|
|
28
28
|
:xcodebuild_extra_args => nil,
|
29
29
|
:xcrun_extra_args => nil,
|
30
30
|
:timestamp_build => nil,
|
31
|
-
:pod_repo_sources => nil
|
32
|
-
:watch_app => false
|
31
|
+
:pod_repo_sources => nil
|
33
32
|
)
|
34
33
|
@namespace = namespace
|
35
34
|
yield @configuration if block_given?
|
@@ -72,7 +71,7 @@ module XcodeBuilder
|
|
72
71
|
@configuration.timestamp_plist if @configuration.timestamp_build
|
73
72
|
|
74
73
|
print "Building Project..."
|
75
|
-
success = xcodebuild @configuration.build_arguments, "
|
74
|
+
success = xcodebuild @configuration.build_arguments, "build"
|
76
75
|
raise "** BUILD FAILED **" unless success
|
77
76
|
puts "Done"
|
78
77
|
end
|
@@ -81,29 +80,41 @@ module XcodeBuilder
|
|
81
80
|
def package
|
82
81
|
build
|
83
82
|
|
84
|
-
|
83
|
+
print "Packaging and Signing..."
|
84
|
+
if (@configuration.signing_identity != nil) then
|
85
|
+
puts ""
|
86
|
+
print "Signing identity: #{@configuration.signing_identity}"
|
87
|
+
end
|
88
|
+
|
85
89
|
# trash and create the dist IPA path if needed
|
86
90
|
FileUtils.rm_rf @configuration.package_destination_path unless !File.exists? @configuration.package_destination_path
|
87
91
|
FileUtils.mkdir_p @configuration.package_destination_path
|
88
92
|
|
89
93
|
# Construct the IPA and Sign it
|
90
94
|
cmd = []
|
91
|
-
cmd << "
|
92
|
-
cmd << "-
|
93
|
-
cmd << "
|
94
|
-
cmd << "
|
95
|
-
cmd << "-
|
96
|
-
cmd << "'#{
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
95
|
+
cmd << "/usr/bin/xcrun"
|
96
|
+
cmd << "-sdk iphoneos"
|
97
|
+
cmd << "PackageApplication"
|
98
|
+
cmd << "'#{@configuration.built_app_path}'"
|
99
|
+
cmd << "-o '#{@configuration.ipa_path}'"
|
100
|
+
cmd << "--sign '#{@configuration.signing_identity}'" unless @configuration.signing_identity == nil
|
101
|
+
|
102
|
+
if @configuration.xcrun_extra_args then
|
103
|
+
cmd.concat @configuration.xcrun_extra_args if @configuration.xcrun_extra_args.is_a? Array
|
104
|
+
cmd << @configuration.xcrun_extra_args if @configuration.xcrun_extra_args.is_a? String
|
105
|
+
end
|
102
106
|
|
107
|
+
puts "Running #{cmd.join(" ")}" if @configuration.verbose
|
108
|
+
cmd << "2>&1 /dev/null"
|
109
|
+
cmd = cmd.join(" ")
|
110
|
+
system(cmd)
|
111
|
+
|
103
112
|
if @configuration.watch_app then
|
104
113
|
reinject_wk_stub_in_ipa
|
105
114
|
end
|
106
|
-
|
115
|
+
|
116
|
+
puts ""
|
117
|
+
puts "Done."
|
107
118
|
end
|
108
119
|
|
109
120
|
def reinject_wk_stub_in_ipa
|
@@ -141,6 +152,7 @@ module XcodeBuilder
|
|
141
152
|
puts ""
|
142
153
|
end
|
143
154
|
|
155
|
+
|
144
156
|
def deploy
|
145
157
|
package
|
146
158
|
@configuration.deployment_strategy.deploy
|
@@ -22,8 +22,6 @@ module XcodeBuilder
|
|
22
22
|
end
|
23
23
|
|
24
24
|
args << "-sdk iphoneos"
|
25
|
-
|
26
|
-
args << "-archivePath #{File.expand_path xcarchive_path}"
|
27
25
|
|
28
26
|
args << "-configuration '#{configuration}'"
|
29
27
|
args << "BUILD_DIR=\"#{File.expand_path build_dir}\""
|
@@ -137,10 +135,6 @@ module XcodeBuilder
|
|
137
135
|
File.join("#{build_dir}", "#{configuration}-iphoneos", "#{app_file_name}")
|
138
136
|
end
|
139
137
|
|
140
|
-
def xcarchive_path
|
141
|
-
File.join("#{build_dir}", "#{configuration}.xcarchive")
|
142
|
-
end
|
143
|
-
|
144
138
|
def ipa_path
|
145
139
|
File.join(File.expand_path(package_destination_path), ipa_name)
|
146
140
|
end
|