xcodebuilder 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/xcode_builder.rb +27 -15
- data/lib/xcode_builder/release_strategies/git.rb +5 -4
- metadata +69 -84
data/lib/xcode_builder.rb
CHANGED
@@ -53,7 +53,7 @@ module XcodeBuilder
|
|
53
53
|
system(cmd)
|
54
54
|
end
|
55
55
|
|
56
|
-
#
|
56
|
+
# desc "Clean the Build"
|
57
57
|
def clean
|
58
58
|
unless @configuration.skip_clean
|
59
59
|
print "Cleaning Project..."
|
@@ -62,7 +62,7 @@ module XcodeBuilder
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
-
#
|
65
|
+
# desc "Build the beta release of the app"
|
66
66
|
def build
|
67
67
|
clean unless @configuration.skip_clean
|
68
68
|
|
@@ -72,7 +72,7 @@ module XcodeBuilder
|
|
72
72
|
puts "Done"
|
73
73
|
end
|
74
74
|
|
75
|
-
#
|
75
|
+
# desc "Package the release as a distributable archive"
|
76
76
|
def package
|
77
77
|
build
|
78
78
|
# there is no need for IPA or dSYM unless we have a device/macosx build,
|
@@ -91,7 +91,7 @@ module XcodeBuilder
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
94
|
-
#
|
94
|
+
# desc "Builds an IPA from the built .app"
|
95
95
|
def package_ios_app
|
96
96
|
print "Packaging and Signing..."
|
97
97
|
raise "** PACKAGE FAILED ** No Signing Identity Found" unless @configuration.signing_identity
|
@@ -106,8 +106,8 @@ module XcodeBuilder
|
|
106
106
|
cmd << "PackageApplication"
|
107
107
|
cmd << "-v '#{@configuration.built_app_path}'"
|
108
108
|
cmd << "-o '#{@configuration.ipa_path}'"
|
109
|
-
cmd << "--sign '#{@configuration.signing_identity}'"
|
110
|
-
cmd << "--embed '#{@configuration.provisioning_profile}'"
|
109
|
+
cmd << "--sign '#{@configuration.signing_identity}'" unless @configuration.signing_identity == nil
|
110
|
+
cmd << "--embed '#{@configuration.provisioning_profile}'"
|
111
111
|
if @configuration.xcrun_extra_args then
|
112
112
|
cmd.concat @configuration.xcrun_extra_args if @configuration.xcrun_extra_args.is_a? Array
|
113
113
|
cmd << @configuration.xcrun_extra_args if @configuration.xcrun_extra_args.is_a? String
|
@@ -143,9 +143,7 @@ module XcodeBuilder
|
|
143
143
|
|
144
144
|
# desc "Zips the dSYM to the package folder"
|
145
145
|
def package_dsym
|
146
|
-
if @configuration.skip_dsym
|
147
|
-
return
|
148
|
-
end
|
146
|
+
return if @configuration.skip_dsym
|
149
147
|
print "Packaging dSYM..."
|
150
148
|
|
151
149
|
# copy the dSYM to the pkg destination
|
@@ -203,14 +201,18 @@ module XcodeBuilder
|
|
203
201
|
puts "ZIP package: #{@configuration.zipped_package_name}"
|
204
202
|
end
|
205
203
|
|
206
|
-
# desc "For CocoaPod libraries:
|
204
|
+
# desc "For CocoaPod libraries: dry run, tags SCM, pushes to cocoapod and increments build number"
|
207
205
|
def pod_release
|
208
|
-
build
|
209
206
|
raise "CocoaPod repo is not set, aborting cocoapod_release task." unless @configuration.pod_repo != nil
|
210
207
|
raise "Spec file is not set, aborting cocoapod_release task." unless @configuration.podspec_file != nil
|
211
208
|
|
212
|
-
#
|
209
|
+
# make a dry run first
|
210
|
+
pod_dry_run
|
211
|
+
|
212
|
+
# tag source as needed
|
213
213
|
@configuration.release_strategy.tag_current_version
|
214
|
+
|
215
|
+
# and push pod pod
|
214
216
|
push_pod
|
215
217
|
|
216
218
|
# increment version numbers
|
@@ -220,16 +222,27 @@ module XcodeBuilder
|
|
220
222
|
end
|
221
223
|
end
|
222
224
|
|
225
|
+
# runs a pod dry run before tagging
|
226
|
+
def pod_dry_run
|
227
|
+
clean unless @configuration.skip_clean
|
228
|
+
|
229
|
+
print "Pod dry run..."
|
230
|
+
podfile = if @configuration.podspec_file == nil then "" else @configuration.podspec_file end
|
231
|
+
result = system "pod spec lint #{podfile} --error-only"
|
232
|
+
raise "** Pod dry run failed **" if !result
|
233
|
+
puts "Done"
|
234
|
+
end
|
235
|
+
|
223
236
|
def push_pod
|
224
237
|
cmd = []
|
225
238
|
cmd << "pod"
|
226
239
|
cmd << "push"
|
227
240
|
cmd << @configuration.pod_repo
|
228
|
-
# cmd << "--local-only"
|
229
241
|
cmd << "--allow-warnings"
|
230
242
|
|
231
243
|
print "Pushing to CocoaPod..."
|
232
|
-
system (cmd.join " ")
|
244
|
+
result = system (cmd.join " ")
|
245
|
+
raise "** Pod push failed **" if !result
|
233
246
|
puts "Done."
|
234
247
|
end
|
235
248
|
|
@@ -255,7 +268,6 @@ module XcodeBuilder
|
|
255
268
|
|
256
269
|
def deploy
|
257
270
|
package
|
258
|
-
# deploy first
|
259
271
|
@configuration.deployment_strategy.deploy
|
260
272
|
end
|
261
273
|
|
@@ -26,12 +26,11 @@ module XcodeBuilder
|
|
26
26
|
#first, tag
|
27
27
|
cmd << "git"
|
28
28
|
cmd << "tag"
|
29
|
-
# -f sounds brutal to start with, so let's give it a try without
|
30
|
-
# cmd << "-f"
|
31
29
|
cmd << @tag_name
|
32
30
|
|
33
31
|
cmd << "2>&1 %s git.output" % (@configuration.verbose ? '| tee' : '>')
|
34
|
-
system(cmd.join " ")
|
32
|
+
result = system(cmd.join " ")
|
33
|
+
raise "Could not tag repository" unless result
|
35
34
|
puts
|
36
35
|
puts "Done"
|
37
36
|
|
@@ -46,6 +45,7 @@ module XcodeBuilder
|
|
46
45
|
cmd << @branch
|
47
46
|
cmd << "2>&1 %s git.output" % (@configuration.verbose ? '| tee' : '>')
|
48
47
|
system(cmd.join " ")
|
48
|
+
raise "Could not push to #{@origin}" unless result
|
49
49
|
|
50
50
|
puts
|
51
51
|
puts "Done"
|
@@ -108,7 +108,8 @@ module XcodeBuilder
|
|
108
108
|
cmd << @branch
|
109
109
|
cmd << "2>&1 %s git.output" % (@configuration.verbose ? '| tee' : '>')
|
110
110
|
|
111
|
-
system(cmd.join " ")
|
111
|
+
result = system(cmd.join " ")
|
112
|
+
raise "Could not push #{@branch} to #{@origin}" unless result
|
112
113
|
puts
|
113
114
|
end
|
114
115
|
end
|
metadata
CHANGED
@@ -1,96 +1,90 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: xcodebuilder
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.8
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 7
|
10
|
-
version: 0.0.7
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Olivier Larivain
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2013-07-25 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: CFPropertyList
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
hash: 15
|
29
|
-
segments:
|
30
|
-
- 2
|
31
|
-
- 0
|
32
|
-
- 0
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
33
21
|
version: 2.0.0
|
34
22
|
type: :runtime
|
35
|
-
version_requirements: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: uuid
|
38
23
|
prerelease: false
|
39
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
25
|
none: false
|
41
|
-
requirements:
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 2.0.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: uuid
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
42
35
|
- - ~>
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
hash: 1
|
45
|
-
segments:
|
46
|
-
- 2
|
47
|
-
- 3
|
48
|
-
- 1
|
36
|
+
- !ruby/object:Gem::Version
|
49
37
|
version: 2.3.1
|
50
38
|
type: :runtime
|
51
|
-
version_requirements: *id002
|
52
|
-
- !ruby/object:Gem::Dependency
|
53
|
-
name: rest-client
|
54
39
|
prerelease: false
|
55
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 2.3.1
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rest-client
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
56
49
|
none: false
|
57
|
-
requirements:
|
50
|
+
requirements:
|
58
51
|
- - ~>
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
hash: 13
|
61
|
-
segments:
|
62
|
-
- 1
|
63
|
-
- 6
|
64
|
-
- 1
|
52
|
+
- !ruby/object:Gem::Version
|
65
53
|
version: 1.6.1
|
66
54
|
type: :runtime
|
67
|
-
version_requirements: *id003
|
68
|
-
- !ruby/object:Gem::Dependency
|
69
|
-
name: json
|
70
55
|
prerelease: false
|
71
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
57
|
none: false
|
73
|
-
requirements:
|
74
|
-
- -
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.6.1
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: json
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
80
70
|
type: :runtime
|
81
|
-
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
82
78
|
description:
|
83
|
-
email:
|
79
|
+
email:
|
84
80
|
- olarivain@gmail.com
|
85
81
|
executables: []
|
86
|
-
|
87
82
|
extensions: []
|
88
|
-
|
89
|
-
extra_rdoc_files:
|
83
|
+
extra_rdoc_files:
|
90
84
|
- README.md
|
91
85
|
- LICENSE
|
92
86
|
- CHANGES.md
|
93
|
-
files:
|
87
|
+
files:
|
94
88
|
- CHANGES.md
|
95
89
|
- LICENSE
|
96
90
|
- README.md
|
@@ -105,37 +99,28 @@ files:
|
|
105
99
|
- lib/xcodebuilder.rb
|
106
100
|
homepage: http://github.com/olarivain/xcodebuilder
|
107
101
|
licenses: []
|
108
|
-
|
109
102
|
post_install_message:
|
110
|
-
rdoc_options:
|
103
|
+
rdoc_options:
|
111
104
|
- --main
|
112
105
|
- README.md
|
113
|
-
require_paths:
|
106
|
+
require_paths:
|
114
107
|
- lib
|
115
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
108
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
116
109
|
none: false
|
117
|
-
requirements:
|
118
|
-
- -
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
|
121
|
-
|
122
|
-
- 0
|
123
|
-
version: "0"
|
124
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ! '>='
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: '0'
|
114
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
115
|
none: false
|
126
|
-
requirements:
|
127
|
-
- -
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
|
130
|
-
segments:
|
131
|
-
- 0
|
132
|
-
version: "0"
|
116
|
+
requirements:
|
117
|
+
- - ! '>='
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
133
120
|
requirements: []
|
134
|
-
|
135
121
|
rubyforge_project:
|
136
|
-
rubygems_version: 1.8.
|
122
|
+
rubygems_version: 1.8.25
|
137
123
|
signing_key:
|
138
124
|
specification_version: 3
|
139
125
|
summary: A set of Rake tasks and utilities for building and releasing xcode projects
|
140
126
|
test_files: []
|
141
|
-
|