shenzhen 0.0.3 → 0.1.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/Gemfile.lock +1 -1
- data/lib/shenzhen.rb +1 -1
- data/lib/shenzhen/commands/build.rb +15 -5
- data/lib/shenzhen/plugins/testflight.rb +19 -0
- metadata +16 -18
- data/shenzhen-0.0.1.gem +0 -0
- data/shenzhen-0.0.2.gem +0 -0
data/Gemfile.lock
CHANGED
data/lib/shenzhen.rb
CHANGED
@@ -21,9 +21,16 @@ command :build do |c|
|
|
21
21
|
|
22
22
|
determine_workspace_or_project! unless @workspace || @project
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
if @workspace
|
25
|
+
unless @configuration
|
26
|
+
say_warning "Configuration was not passed, defaulting to Debug" unless @configuration
|
27
|
+
@configuration = "Debug"
|
28
|
+
end
|
29
|
+
else
|
30
|
+
determine_configuration! unless @configuration
|
31
|
+
say_error "Configuration #{@configuration} not found" and abort unless @xcodebuild_info.build_configurations.include?(@configuration)
|
32
|
+
end
|
33
|
+
|
27
34
|
determine_scheme! unless @scheme
|
28
35
|
say_error "Scheme #{@scheme} not found" and abort unless @xcodebuild_info.schemes.include?(@scheme)
|
29
36
|
|
@@ -39,17 +46,20 @@ command :build do |c|
|
|
39
46
|
flags << "-configuration #{@configuration}"
|
40
47
|
|
41
48
|
ENV['CC'] = nil # Fix for RVM
|
42
|
-
abort unless system
|
49
|
+
abort unless system %{xcodebuild #{flags.join(' ')} clean build 1> /dev/null}
|
43
50
|
|
44
51
|
log "xcrun", "PackageApplication"
|
45
52
|
|
46
53
|
@xcodebuild_settings = Shenzhen::XcodeBuild.settings(flags)
|
47
|
-
|
48
54
|
@app_path = File.join(@xcodebuild_settings['BUILT_PRODUCTS_DIR'], @xcodebuild_settings['PRODUCT_NAME']) + ".app"
|
49
55
|
@dsym_path = @app_path + ".dSYM"
|
56
|
+
@dsym_filename = "#{@xcodebuild_settings['PRODUCT_NAME']}.app.dSYM"
|
50
57
|
@ipa_path = File.join(Dir.pwd, @xcodebuild_settings['PRODUCT_NAME']) + ".ipa"
|
51
58
|
abort unless system %{xcrun -sdk iphoneos PackageApplication -v "#{@app_path}" -o "#{@ipa_path}" --embed "#{@dsym_path}" 1> /dev/null}
|
52
59
|
|
60
|
+
log "zip", @dsym_filename
|
61
|
+
abort unless system %{cp -r "#{@dsym_path}" . && zip -r "#{@dsym_filename}.zip" "#{@dsym_filename}" >/dev/null && rm -rf "#{@dsym_filename}"}
|
62
|
+
|
53
63
|
say_ok "#{File.basename(@ipa_path)} successfully built" unless options.quiet
|
54
64
|
end
|
55
65
|
|
@@ -25,6 +25,10 @@ module Shenzhen::Plugins
|
|
25
25
|
:file => Faraday::UploadIO.new(ipa, 'application/octet-stream')
|
26
26
|
})
|
27
27
|
|
28
|
+
if dsym_filename = options.delete(:dsym_filename)
|
29
|
+
options[:dsym] = Faraday::UploadIO.new(dsym_filename, 'application/octet-stream')
|
30
|
+
end
|
31
|
+
|
28
32
|
@connection.post("/api/builds.json", options).on_complete do |env|
|
29
33
|
yield env[:status], env[:body] if block_given?
|
30
34
|
end
|
@@ -38,6 +42,7 @@ command :'distribute:testflight' do |c|
|
|
38
42
|
c.summary = "Distribute an .ipa file over testflight"
|
39
43
|
c.description = ""
|
40
44
|
c.option '-f', '--file FILE', ".ipa file for the build"
|
45
|
+
c.option '-d', '--dsym FILE', "zipped .dsym package for the build"
|
41
46
|
c.option '-a', '--api_token TOKEN', "API Token. Available at https://testflightapp.com/account/#api-token"
|
42
47
|
c.option '-T', '--team_token TOKEN', "Team Token. Available at https://testflightapp.com/dashboard/team/edit/"
|
43
48
|
c.option '-m', '--notes NOTES', "Release notes for the build"
|
@@ -50,6 +55,9 @@ command :'distribute:testflight' do |c|
|
|
50
55
|
determine_file! unless @file = options.file
|
51
56
|
say_error "Missing or unspecified .ipa file" and abort unless @file and File.exist?(@file)
|
52
57
|
|
58
|
+
determine_dsym! unless @dsym = options.dsym
|
59
|
+
say_error "Specified dSYM.zip file doesn't exist" if @dsym and !File.exist?(@dsym)
|
60
|
+
|
53
61
|
determine_api_token! unless @api_token = options.api_token
|
54
62
|
say_error "Missing API Token" and abort unless @api_token
|
55
63
|
|
@@ -61,6 +69,7 @@ command :'distribute:testflight' do |c|
|
|
61
69
|
parameters = {}
|
62
70
|
parameters[:file] = @file
|
63
71
|
parameters[:notes] = @notes
|
72
|
+
parameters[:dsym_filename] = @dsym if @dsym
|
64
73
|
parameters[:notify] = "true" if options.notify
|
65
74
|
parameters[:replace] = "true" if options.replace
|
66
75
|
parameters[:distribution_lists] = options.lists if options.lists
|
@@ -95,6 +104,16 @@ command :'distribute:testflight' do |c|
|
|
95
104
|
end
|
96
105
|
end
|
97
106
|
|
107
|
+
def determine_dsym!
|
108
|
+
dsym_files = Dir['*.dSYM.zip']
|
109
|
+
@dsym ||= case dsym_files.length
|
110
|
+
when 0 then nil
|
111
|
+
when 1 then dsym_files.first
|
112
|
+
else
|
113
|
+
@dsym = choose "Select a .dSYM.zip file:", *dsym_files
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
98
117
|
def determine_notes!
|
99
118
|
placeholder = %{What's new in this release: }
|
100
119
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shenzhen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-09 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70357169989920 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.6.1
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70357169989920
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70357169987940 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.9.2
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70357169987940
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: commander
|
38
|
-
requirement: &
|
38
|
+
requirement: &70357169985980 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 4.1.2
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70357169985980
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: json
|
49
|
-
requirement: &
|
49
|
+
requirement: &70357169976100 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.7.3
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70357169976100
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: faraday
|
60
|
-
requirement: &
|
60
|
+
requirement: &70357169973340 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 0.8.0
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70357169973340
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: faraday_middleware
|
71
|
-
requirement: &
|
71
|
+
requirement: &70357169971200 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: 0.8.7
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70357169971200
|
80
80
|
description: CLI for Building & Distributing iOS Apps (.ipa Files)
|
81
81
|
email: m@mattt.me
|
82
82
|
executables:
|
@@ -96,8 +96,6 @@ files:
|
|
96
96
|
- ./LICENSE
|
97
97
|
- ./Rakefile
|
98
98
|
- ./README.md
|
99
|
-
- ./shenzhen-0.0.1.gem
|
100
|
-
- ./shenzhen-0.0.2.gem
|
101
99
|
- ./shenzhen.gemspec
|
102
100
|
- bin/ipa
|
103
101
|
homepage: http://github.com/mattt/shenzhen
|
@@ -114,7 +112,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
114
112
|
version: '0'
|
115
113
|
segments:
|
116
114
|
- 0
|
117
|
-
hash:
|
115
|
+
hash: -2320972868632584491
|
118
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
117
|
none: false
|
120
118
|
requirements:
|
@@ -123,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
121
|
version: '0'
|
124
122
|
segments:
|
125
123
|
- 0
|
126
|
-
hash:
|
124
|
+
hash: -2320972868632584491
|
127
125
|
requirements: []
|
128
126
|
rubyforge_project:
|
129
127
|
rubygems_version: 1.8.15
|
data/shenzhen-0.0.1.gem
DELETED
Binary file
|
data/shenzhen-0.0.2.gem
DELETED
Binary file
|