betabuilder 0.5.0 → 0.6.0
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.
- data/lib/beta_builder/archived_build.rb +8 -1
- data/lib/beta_builder.rb +45 -10
- metadata +47 -82
@@ -9,7 +9,14 @@ module BetaBuilder
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def save_to(path)
|
12
|
-
|
12
|
+
if @configuration.xcode4_archive_mode
|
13
|
+
date_path = File.join(path, "#{Time.now.strftime('%Y-%m-%d')}")
|
14
|
+
FileUtils.mkdir_p(date_path)
|
15
|
+
archive_path = File.join(date_path, "#{@configuration.target}.xcarchive")
|
16
|
+
else
|
17
|
+
archive_path = File.join(path, "#{@uuid}.apparchive")
|
18
|
+
end
|
19
|
+
|
13
20
|
FileUtils.mkdir(archive_path)
|
14
21
|
FileUtils.cp_r(@configuration.built_app_path, archive_path)
|
15
22
|
FileUtils.cp_r(@configuration.built_app_dsym_path, archive_path)
|
data/lib/beta_builder.rb
CHANGED
@@ -14,7 +14,12 @@ module BetaBuilder
|
|
14
14
|
:auto_archive => false,
|
15
15
|
:archive_path => File.expand_path("~/Library/Application Support/Developer/Shared/Archived Applications"),
|
16
16
|
:xcodebuild_path => "xcodebuild",
|
17
|
-
:project_file_path => nil
|
17
|
+
:project_file_path => nil,
|
18
|
+
:workspace_path => nil,
|
19
|
+
:scheme => nil,
|
20
|
+
:app_name => nil,
|
21
|
+
:xcode4_archive_mode => false,
|
22
|
+
:skip_clean => false
|
18
23
|
)
|
19
24
|
@namespace = namespace
|
20
25
|
yield @configuration if block_given?
|
@@ -22,25 +27,53 @@ module BetaBuilder
|
|
22
27
|
end
|
23
28
|
|
24
29
|
def xcodebuild(*args)
|
25
|
-
|
30
|
+
# we're using tee as we still want to see our build output on screen
|
31
|
+
system("#{@configuration.xcodebuild_path} #{args.join(" ")} | tee build.output")
|
26
32
|
end
|
27
33
|
|
28
34
|
class Configuration < OpenStruct
|
29
35
|
def build_arguments
|
30
|
-
|
31
|
-
|
36
|
+
if workspace_path
|
37
|
+
raise "A scheme is required if building from a workspace" unless scheme
|
38
|
+
"-workspace '#{workspace_path}' -scheme '#{scheme}' -configuration '#{configuration}'"
|
39
|
+
else
|
40
|
+
args = "-target '#{target}' -configuration '#{configuration}' -sdk iphoneos"
|
41
|
+
args << " -project #{project_file_path}" if project_file_path
|
42
|
+
args
|
43
|
+
end
|
32
44
|
end
|
33
45
|
|
34
|
-
def
|
35
|
-
|
46
|
+
def app_file_name
|
47
|
+
if app_name
|
48
|
+
"#{app_name}.app"
|
49
|
+
else
|
50
|
+
"#{target}.app"
|
51
|
+
end
|
36
52
|
end
|
37
53
|
|
38
54
|
def ipa_name
|
39
|
-
|
55
|
+
if app_name
|
56
|
+
"#{app_name}.ipa"
|
57
|
+
else
|
58
|
+
"#{target}.ipa"
|
59
|
+
end
|
40
60
|
end
|
41
61
|
|
42
62
|
def built_app_path
|
43
|
-
|
63
|
+
if build_dir == :derived
|
64
|
+
"#{derived_build_dir_from_build_output}/#{configuration}-iphoneos/#{app_file_name}"
|
65
|
+
else
|
66
|
+
"#{build_dir}/#{configuration}-iphoneos/#{app_file_name}"
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def derived_build_dir_from_build_output
|
71
|
+
output = File.read("build.output")
|
72
|
+
|
73
|
+
# yes, this is truly horrible, but unless somebody else can find a better way...
|
74
|
+
reference = output.split("\n").grep(/Xcode\/DerivedData\/#{scheme}-(.*)/).first.split(" ").last
|
75
|
+
derived_data_directory = reference.split("/Build/Products").first
|
76
|
+
"#{derived_data_directory}/Build/Products/"
|
44
77
|
end
|
45
78
|
|
46
79
|
def built_app_dsym_path
|
@@ -75,7 +108,9 @@ module BetaBuilder
|
|
75
108
|
end
|
76
109
|
|
77
110
|
task :clean do
|
78
|
-
|
111
|
+
unless @configuration.skip_clean
|
112
|
+
xcodebuild @configuration.build_arguments, "clean"
|
113
|
+
end
|
79
114
|
end
|
80
115
|
|
81
116
|
desc "Package the beta release as an IPA file"
|
@@ -86,7 +121,7 @@ module BetaBuilder
|
|
86
121
|
|
87
122
|
FileUtils.rm_rf('pkg') && FileUtils.mkdir_p('pkg')
|
88
123
|
FileUtils.mkdir_p("pkg/Payload")
|
89
|
-
FileUtils.mv(@configuration.built_app_path, "pkg/Payload/#{@configuration.
|
124
|
+
FileUtils.mv(@configuration.built_app_path, "pkg/Payload/#{@configuration.app_file_name}")
|
90
125
|
Dir.chdir("pkg") do
|
91
126
|
system("zip -r '#{@configuration.ipa_name}' Payload")
|
92
127
|
end
|
metadata
CHANGED
@@ -1,97 +1,70 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: betabuilder
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.6.0
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 5
|
9
|
-
- 0
|
10
|
-
version: 0.5.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Luke Redpath
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-07-22 00:00:00.000000000 +01:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
21
16
|
name: CFPropertyList
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
17
|
+
requirement: &2156056740 !ruby/object:Gem::Requirement
|
24
18
|
none: false
|
25
|
-
requirements:
|
19
|
+
requirements:
|
26
20
|
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
hash: 15
|
29
|
-
segments:
|
30
|
-
- 2
|
31
|
-
- 0
|
32
|
-
- 0
|
21
|
+
- !ruby/object:Gem::Version
|
33
22
|
version: 2.0.0
|
34
23
|
type: :runtime
|
35
|
-
version_requirements: *id001
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: uuid
|
38
24
|
prerelease: false
|
39
|
-
|
25
|
+
version_requirements: *2156056740
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: uuid
|
28
|
+
requirement: &2156056260 !ruby/object:Gem::Requirement
|
40
29
|
none: false
|
41
|
-
requirements:
|
30
|
+
requirements:
|
42
31
|
- - ~>
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
hash: 1
|
45
|
-
segments:
|
46
|
-
- 2
|
47
|
-
- 3
|
48
|
-
- 1
|
32
|
+
- !ruby/object:Gem::Version
|
49
33
|
version: 2.3.1
|
50
34
|
type: :runtime
|
51
|
-
version_requirements: *id002
|
52
|
-
- !ruby/object:Gem::Dependency
|
53
|
-
name: rest-client
|
54
35
|
prerelease: false
|
55
|
-
|
36
|
+
version_requirements: *2156056260
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: rest-client
|
39
|
+
requirement: &2156054940 !ruby/object:Gem::Requirement
|
56
40
|
none: false
|
57
|
-
requirements:
|
41
|
+
requirements:
|
58
42
|
- - ~>
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
hash: 13
|
61
|
-
segments:
|
62
|
-
- 1
|
63
|
-
- 6
|
64
|
-
- 1
|
43
|
+
- !ruby/object:Gem::Version
|
65
44
|
version: 1.6.1
|
66
45
|
type: :runtime
|
67
|
-
version_requirements: *id003
|
68
|
-
- !ruby/object:Gem::Dependency
|
69
|
-
name: json
|
70
46
|
prerelease: false
|
71
|
-
|
47
|
+
version_requirements: *2156054940
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: json
|
50
|
+
requirement: &2156053160 !ruby/object:Gem::Requirement
|
72
51
|
none: false
|
73
|
-
requirements:
|
52
|
+
requirements:
|
74
53
|
- - ~>
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
hash: 11
|
77
|
-
segments:
|
78
|
-
- 1
|
79
|
-
- 4
|
80
|
-
- 6
|
54
|
+
- !ruby/object:Gem::Version
|
81
55
|
version: 1.4.6
|
82
56
|
type: :runtime
|
83
|
-
|
57
|
+
prerelease: false
|
58
|
+
version_requirements: *2156053160
|
84
59
|
description:
|
85
60
|
email: luke@lukeredpath.co.uk
|
86
61
|
executables: []
|
87
|
-
|
88
62
|
extensions: []
|
89
|
-
|
90
|
-
extra_rdoc_files:
|
63
|
+
extra_rdoc_files:
|
91
64
|
- README.md
|
92
65
|
- LICENSE
|
93
66
|
- CHANGES.md
|
94
|
-
files:
|
67
|
+
files:
|
95
68
|
- CHANGES.md
|
96
69
|
- LICENSE
|
97
70
|
- README.md
|
@@ -101,39 +74,31 @@ files:
|
|
101
74
|
- lib/beta_builder/deployment_strategies.rb
|
102
75
|
- lib/beta_builder.rb
|
103
76
|
- lib/betabuilder.rb
|
77
|
+
has_rdoc: true
|
104
78
|
homepage: http://github.com/lukeredpath/betabuilder
|
105
79
|
licenses: []
|
106
|
-
|
107
80
|
post_install_message:
|
108
|
-
rdoc_options:
|
81
|
+
rdoc_options:
|
109
82
|
- --main
|
110
83
|
- README.md
|
111
|
-
require_paths:
|
84
|
+
require_paths:
|
112
85
|
- lib
|
113
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
86
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
114
87
|
none: false
|
115
|
-
requirements:
|
116
|
-
- -
|
117
|
-
- !ruby/object:Gem::Version
|
118
|
-
|
119
|
-
|
120
|
-
- 0
|
121
|
-
version: "0"
|
122
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - ! '>='
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
123
93
|
none: false
|
124
|
-
requirements:
|
125
|
-
- -
|
126
|
-
- !ruby/object:Gem::Version
|
127
|
-
|
128
|
-
segments:
|
129
|
-
- 0
|
130
|
-
version: "0"
|
94
|
+
requirements:
|
95
|
+
- - ! '>='
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
131
98
|
requirements: []
|
132
|
-
|
133
99
|
rubyforge_project:
|
134
|
-
rubygems_version: 1.
|
100
|
+
rubygems_version: 1.6.2
|
135
101
|
signing_key:
|
136
102
|
specification_version: 3
|
137
103
|
summary: A set of Rake tasks and utilities for managing iOS ad-hoc builds
|
138
104
|
test_files: []
|
139
|
-
|