motion-hockeyrink 0.1 → 0.1.1
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 +8 -8
- data/lib/motion/project/hockeyapp.rb +42 -34
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
OWI1MDRlNzZlOTA0Mjc3YjQ1NGNlYzZhNTFkNmY3OWRiNTkzNzBhYQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YzQ5MjFiZDY2ODVhYjlkYzAzY2FhOTA4OTVhYTI1MGVkNjU1ODk4YQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDkxZDA1NTIyYzA3YzFmNzc5NDdiY2Y1ODc4NjM4OWM3NzdiOTNkZGE4Y2Ni
|
10
|
+
Mjg1YzAyMTdkYWRhNzQ1MDc3MjdjNjhiZjg2NjY1MDVjOTJmZDg4MTU2OTcw
|
11
|
+
NjcyYjFlZjllMTgwZjA2NjVlYzU0ZTg2MDM1YmM2NzYyYmViYjk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzU2YTJjMzM2MmI0OWEyNTVjYjRjZTVmZmZiM2IxYmY2ZTkxNmQ5OTYwOTA3
|
14
|
+
ZjBkYzA4ZTBkMmNmY2ZmZmRjYzgyM2VlNzE2OTUxOWVlMzUxYjczZmY4MTMw
|
15
|
+
NmNhMmI2ZTEyNTdhN2E3YmZmZTQ2NThkMjY2OTUwZTMwZjUyNDc=
|
@@ -138,46 +138,54 @@ end; end; end
|
|
138
138
|
namespace 'hockeyapp' do
|
139
139
|
desc "Submit an archive to HockeyApp"
|
140
140
|
task :submit do
|
141
|
+
begin
|
142
|
+
# Set the build status
|
143
|
+
App.config_without_setup.hockeyapp_mode = true
|
144
|
+
|
145
|
+
# Validate configuration settings.
|
146
|
+
prefs = App.config.hockeyapp
|
147
|
+
App.fail "A value for app.hockeyapp.api_token is mandatory" unless prefs.api_token
|
148
|
+
App.fail "A value for app.hockeyapp.app_id is mandatory" unless prefs.app_id
|
149
|
+
|
150
|
+
# Allow CLI overrides for all properties
|
151
|
+
env_configs = HockeyAppConfig::PROPERTIES
|
152
|
+
env_configs.each do |config|
|
153
|
+
value = ENV[config.to_s]
|
154
|
+
if value
|
155
|
+
prefs.send("#{config}=", value)
|
156
|
+
end
|
157
|
+
end
|
141
158
|
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
# Validate configuration settings.
|
146
|
-
prefs = App.config.hockeyapp
|
147
|
-
App.fail "A value for app.hockeyapp.api_token is mandatory" unless prefs.api_token
|
148
|
-
App.fail "A value for app.hockeyapp.app_id is mandatory" unless prefs.app_id
|
159
|
+
# Create an archive
|
160
|
+
Rake::Task["archive"].invoke
|
149
161
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
162
|
+
# An archived version of the .dSYM bundle is needed.
|
163
|
+
app_dsym = App.config.app_bundle('iPhoneOS').sub(/\.app$/, '.dSYM')
|
164
|
+
app_dsym_zip = app_dsym + '.zip'
|
165
|
+
if !File.exist?(app_dsym_zip) or File.mtime(app_dsym) > File.mtime(app_dsym_zip)
|
166
|
+
Dir.chdir(File.dirname(app_dsym)) do
|
167
|
+
sh "/usr/bin/zip -q -r \"#{File.basename(app_dsym)}.zip\" \"#{File.basename(app_dsym)}\""
|
168
|
+
end
|
156
169
|
end
|
157
|
-
end
|
158
170
|
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
171
|
+
# This is an HockeyApp::Version object
|
172
|
+
@hockey_version = prefs.make_version
|
173
|
+
@hockey_version.ipa = nil # File.new(App.config.archive, 'r')
|
174
|
+
@hockey_version.dsym = File.new(app_dsym_zip, 'r')
|
175
|
+
|
176
|
+
App.info "Upload", "#{@hockey_version.inspect}"
|
177
|
+
result = prefs.client.post_new_version @hockey_version
|
178
|
+
App.info "Result", "#{result.inspect}"
|
179
|
+
ensure
|
180
|
+
if @hockey_version
|
181
|
+
if @hockey_version.ipa && @hockey_version.ipa.respond_to?("close")
|
182
|
+
@hockey_version.ipa.close
|
183
|
+
end
|
184
|
+
if @hockey_version.dsym && @hockey_version.dsym.respond_to?("close")
|
185
|
+
@hockey_version.dsym.close
|
186
|
+
end
|
168
187
|
end
|
169
188
|
end
|
170
|
-
|
171
|
-
# This is an HockeyApp::Version object
|
172
|
-
hockey_version = prefs.make_version
|
173
|
-
hockey_version.ipa = File.new(App.config.archive, 'r')
|
174
|
-
hockey_version.dsym = File.new(app_dsym_zip, 'r')
|
175
|
-
|
176
|
-
App.info "Upload", "#{hockey_version.inspect}"
|
177
|
-
result = prefs.client.post_new_version hockey_version
|
178
|
-
hockey_version.ipa.close
|
179
|
-
hockey_version.dsym.close
|
180
|
-
App.info "Result", "#{result.inspect}"
|
181
189
|
end
|
182
190
|
|
183
191
|
|