xcodebuilder 0.0.2
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/CHANGES.md +82 -0
- data/LICENSE +20 -0
- data/README.md +248 -0
- data/lib/xcode_builder.rb +299 -0
- data/lib/xcode_builder/build_output_parser.rb +56 -0
- data/lib/xcode_builder/configuration.rb +151 -0
- data/lib/xcode_builder/deployment_strategies.rb +39 -0
- data/lib/xcode_builder/deployment_strategies/testflight.rb +92 -0
- data/lib/xcode_builder/deployment_strategies/web.rb +104 -0
- data/lib/xcode_builder/release_strategies.rb +34 -0
- data/lib/xcode_builder/release_strategies/git.rb +116 -0
- data/lib/xcodebuilder.rb +1 -0
- metadata +141 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
module XcodeBuilder
|
|
2
|
+
module ReleaseStrategies
|
|
3
|
+
class Git < ReleaseStrategy
|
|
4
|
+
attr_accessor :branch, :origin, :tag_name
|
|
5
|
+
|
|
6
|
+
def prepare
|
|
7
|
+
|
|
8
|
+
if @origin == nil then
|
|
9
|
+
@origin = "origin"
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
if @branch == nil then
|
|
13
|
+
@branch = "master"
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
if @tag_name == nil then
|
|
17
|
+
@tag_name = "v#{@configuration.build_number}"
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def tag_current_version
|
|
22
|
+
puts "Relasing with Git"
|
|
23
|
+
print "Tagging version #{@tag_name}"
|
|
24
|
+
cmd = []
|
|
25
|
+
|
|
26
|
+
#first, tag
|
|
27
|
+
cmd << "git"
|
|
28
|
+
cmd << "tag"
|
|
29
|
+
# -f sounds brutal to start with, so let's give it a try without
|
|
30
|
+
# cmd << "-f"
|
|
31
|
+
cmd << @tag_name
|
|
32
|
+
|
|
33
|
+
cmd << "2>&1 %s git.output" % (@configuration.verbose ? '| tee' : '>')
|
|
34
|
+
system(cmd.join " ")
|
|
35
|
+
puts
|
|
36
|
+
puts "Done"
|
|
37
|
+
|
|
38
|
+
# then push tags to the remote server
|
|
39
|
+
print "Pushing tag to #{@origin} on branch #{@branch}"
|
|
40
|
+
cmd = []
|
|
41
|
+
|
|
42
|
+
cmd << "git"
|
|
43
|
+
cmd << "push"
|
|
44
|
+
cmd << "--tags"
|
|
45
|
+
cmd << @origin
|
|
46
|
+
cmd << @branch
|
|
47
|
+
cmd << "2>&1 %s git.output" % (@configuration.verbose ? '| tee' : '>')
|
|
48
|
+
system(cmd.join " ")
|
|
49
|
+
|
|
50
|
+
puts
|
|
51
|
+
puts "Done"
|
|
52
|
+
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def prepare_for_next_pod_release
|
|
56
|
+
build_number = @configuration.build_number
|
|
57
|
+
raise "build number cannot be empty on release" unless (build_number != nil) && (!build_number.empty?)
|
|
58
|
+
|
|
59
|
+
print "Committing #{@configuration.info_plist} and #{@configuration.podspec_file} with version #{build_number}"
|
|
60
|
+
|
|
61
|
+
stage_files [@configuration.info_plist, @configuration.podspec_file]
|
|
62
|
+
commit_and_push_with_message "Preparing for next pod release..."
|
|
63
|
+
|
|
64
|
+
puts "Done"
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def prepare_for_next_release
|
|
68
|
+
build_number = @configuration.build_number
|
|
69
|
+
raise "build number cannot be empty on release" unless (build_number != nil) && (!build_number.empty?)
|
|
70
|
+
|
|
71
|
+
print "Committing #{@configuration.info_plist} with version #{build_number}"
|
|
72
|
+
|
|
73
|
+
stage_files [@configuration.info_plist]
|
|
74
|
+
commit_and_push_with_message "Preparing for next release..."
|
|
75
|
+
|
|
76
|
+
puts "Done"
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def stage_files files
|
|
80
|
+
cmd = []
|
|
81
|
+
|
|
82
|
+
cmd << "git"
|
|
83
|
+
cmd << "add"
|
|
84
|
+
files.each do |value|
|
|
85
|
+
cmd << value
|
|
86
|
+
end
|
|
87
|
+
system(cmd.join " ")
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def commit_and_push_with_message message
|
|
91
|
+
# then commit it
|
|
92
|
+
cmd = []
|
|
93
|
+
cmd << "git"
|
|
94
|
+
cmd << "commit"
|
|
95
|
+
cmd << "-m"
|
|
96
|
+
cmd << "'#{message}'"
|
|
97
|
+
cmd << "2>&1 %s git.output" % (@configuration.verbose ? '| tee' : '>')
|
|
98
|
+
system(cmd.join " ")
|
|
99
|
+
puts
|
|
100
|
+
puts "Done"
|
|
101
|
+
|
|
102
|
+
# now, push the updated plist
|
|
103
|
+
print "Pushing update to #{@origin}/#{@branch}"
|
|
104
|
+
cmd = []
|
|
105
|
+
cmd << "git"
|
|
106
|
+
cmd << "push"
|
|
107
|
+
cmd << @origin
|
|
108
|
+
cmd << @branch
|
|
109
|
+
cmd << "2>&1 %s git.output" % (@configuration.verbose ? '| tee' : '>')
|
|
110
|
+
|
|
111
|
+
system(cmd.join " ")
|
|
112
|
+
puts
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
data/lib/xcodebuilder.rb
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require File.dirname(__FILE__) + '/xcode_builder'
|
metadata
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: xcodebuilder
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
hash: 27
|
|
5
|
+
prerelease:
|
|
6
|
+
segments:
|
|
7
|
+
- 0
|
|
8
|
+
- 0
|
|
9
|
+
- 2
|
|
10
|
+
version: 0.0.2
|
|
11
|
+
platform: ruby
|
|
12
|
+
authors:
|
|
13
|
+
- Olivier Larivain
|
|
14
|
+
autorequire:
|
|
15
|
+
bindir: bin
|
|
16
|
+
cert_chain: []
|
|
17
|
+
|
|
18
|
+
date: 2013-01-20 00:00:00 Z
|
|
19
|
+
dependencies:
|
|
20
|
+
- !ruby/object:Gem::Dependency
|
|
21
|
+
name: CFPropertyList
|
|
22
|
+
prerelease: false
|
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
|
24
|
+
none: false
|
|
25
|
+
requirements:
|
|
26
|
+
- - ~>
|
|
27
|
+
- !ruby/object:Gem::Version
|
|
28
|
+
hash: 15
|
|
29
|
+
segments:
|
|
30
|
+
- 2
|
|
31
|
+
- 0
|
|
32
|
+
- 0
|
|
33
|
+
version: 2.0.0
|
|
34
|
+
type: :runtime
|
|
35
|
+
version_requirements: *id001
|
|
36
|
+
- !ruby/object:Gem::Dependency
|
|
37
|
+
name: uuid
|
|
38
|
+
prerelease: false
|
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
|
40
|
+
none: false
|
|
41
|
+
requirements:
|
|
42
|
+
- - ~>
|
|
43
|
+
- !ruby/object:Gem::Version
|
|
44
|
+
hash: 1
|
|
45
|
+
segments:
|
|
46
|
+
- 2
|
|
47
|
+
- 3
|
|
48
|
+
- 1
|
|
49
|
+
version: 2.3.1
|
|
50
|
+
type: :runtime
|
|
51
|
+
version_requirements: *id002
|
|
52
|
+
- !ruby/object:Gem::Dependency
|
|
53
|
+
name: rest-client
|
|
54
|
+
prerelease: false
|
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
|
56
|
+
none: false
|
|
57
|
+
requirements:
|
|
58
|
+
- - ~>
|
|
59
|
+
- !ruby/object:Gem::Version
|
|
60
|
+
hash: 13
|
|
61
|
+
segments:
|
|
62
|
+
- 1
|
|
63
|
+
- 6
|
|
64
|
+
- 1
|
|
65
|
+
version: 1.6.1
|
|
66
|
+
type: :runtime
|
|
67
|
+
version_requirements: *id003
|
|
68
|
+
- !ruby/object:Gem::Dependency
|
|
69
|
+
name: json
|
|
70
|
+
prerelease: false
|
|
71
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
|
72
|
+
none: false
|
|
73
|
+
requirements:
|
|
74
|
+
- - ">="
|
|
75
|
+
- !ruby/object:Gem::Version
|
|
76
|
+
hash: 3
|
|
77
|
+
segments:
|
|
78
|
+
- 0
|
|
79
|
+
version: "0"
|
|
80
|
+
type: :runtime
|
|
81
|
+
version_requirements: *id004
|
|
82
|
+
description:
|
|
83
|
+
email:
|
|
84
|
+
- olarivain@gmail.com
|
|
85
|
+
executables: []
|
|
86
|
+
|
|
87
|
+
extensions: []
|
|
88
|
+
|
|
89
|
+
extra_rdoc_files:
|
|
90
|
+
- README.md
|
|
91
|
+
- LICENSE
|
|
92
|
+
- CHANGES.md
|
|
93
|
+
files:
|
|
94
|
+
- CHANGES.md
|
|
95
|
+
- LICENSE
|
|
96
|
+
- README.md
|
|
97
|
+
- lib/xcode_builder/build_output_parser.rb
|
|
98
|
+
- lib/xcode_builder/configuration.rb
|
|
99
|
+
- lib/xcode_builder/deployment_strategies/testflight.rb
|
|
100
|
+
- lib/xcode_builder/deployment_strategies/web.rb
|
|
101
|
+
- lib/xcode_builder/deployment_strategies.rb
|
|
102
|
+
- lib/xcode_builder/release_strategies/git.rb
|
|
103
|
+
- lib/xcode_builder/release_strategies.rb
|
|
104
|
+
- lib/xcode_builder.rb
|
|
105
|
+
- lib/xcodebuilder.rb
|
|
106
|
+
homepage: http://github.com/olarivain/xcodebuilder
|
|
107
|
+
licenses: []
|
|
108
|
+
|
|
109
|
+
post_install_message:
|
|
110
|
+
rdoc_options:
|
|
111
|
+
- --main
|
|
112
|
+
- README.md
|
|
113
|
+
require_paths:
|
|
114
|
+
- lib
|
|
115
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
116
|
+
none: false
|
|
117
|
+
requirements:
|
|
118
|
+
- - ">="
|
|
119
|
+
- !ruby/object:Gem::Version
|
|
120
|
+
hash: 3
|
|
121
|
+
segments:
|
|
122
|
+
- 0
|
|
123
|
+
version: "0"
|
|
124
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
|
+
none: false
|
|
126
|
+
requirements:
|
|
127
|
+
- - ">="
|
|
128
|
+
- !ruby/object:Gem::Version
|
|
129
|
+
hash: 3
|
|
130
|
+
segments:
|
|
131
|
+
- 0
|
|
132
|
+
version: "0"
|
|
133
|
+
requirements: []
|
|
134
|
+
|
|
135
|
+
rubyforge_project:
|
|
136
|
+
rubygems_version: 1.8.24
|
|
137
|
+
signing_key:
|
|
138
|
+
specification_version: 3
|
|
139
|
+
summary: A set of Rake tasks and utilities for building and releasing xcode projects
|
|
140
|
+
test_files: []
|
|
141
|
+
|