motion-hockeyrink 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +8 -8
  2. data/lib/motion/project/hockeyapp.rb +42 -34
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OWU2NTAyMWMyZjFjNmUxZGM1MTE2MWI0YmY3NDI1ZjA5NmM2NTU0Yw==
4
+ OWI1MDRlNzZlOTA0Mjc3YjQ1NGNlYzZhNTFkNmY3OWRiNTkzNzBhYQ==
5
5
  data.tar.gz: !binary |-
6
- MDVlMWZmMGYxNmEyNjM0YTNmZGFmOGNkOWFkZDI3NzcwZWVjZTM5Yw==
6
+ YzQ5MjFiZDY2ODVhYjlkYzAzY2FhOTA4OTVhYTI1MGVkNjU1ODk4YQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MTc0ZGEwYjRhZGE5M2JjODE2YTQ3OWU4Yjc1YzgwMGRkYjEwMTU4MWFiMmU1
10
- N2Y2YTUyMDYzODdhZDY5YjIyNDExYmU5MWExNzU3ZjVmNzNjNWMzMWFlOWM4
11
- NTUyOGM3ZmQyY2JmMDgxYjYzMjI0ZjVkNjc0OGViNDZmN2ZjZjc=
9
+ NDkxZDA1NTIyYzA3YzFmNzc5NDdiY2Y1ODc4NjM4OWM3NzdiOTNkZGE4Y2Ni
10
+ Mjg1YzAyMTdkYWRhNzQ1MDc3MjdjNjhiZjg2NjY1MDVjOTJmZDg4MTU2OTcw
11
+ NjcyYjFlZjllMTgwZjA2NjVlYzU0ZTg2MDM1YmM2NzYyYmViYjk=
12
12
  data.tar.gz: !binary |-
13
- NGM4YmNjY2Y3MTU1ODdiNTVlOGJmMGY2M2RlODcwOGU2NTMwZTFkYTEwMDgz
14
- OTdjOTc0ZDU1YTY1OGZiYzliOWM2YzY2MmUzOWU4ZWEzYTMzMDRlOTE3NTFk
15
- MmM5ZjQ3MzAyMGU5MmQ3ZTM4NDI0ZTI4NGY5YTdlNTBjYmQ0ZDM=
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
- # 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
159
+ # Create an archive
160
+ Rake::Task["archive"].invoke
149
161
 
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)
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
- # Create an archive
160
- Rake::Task["archive"].invoke
161
-
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)}\""
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-hockeyrink
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clay Allsopp