motion-hockeyapp-task 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +22 -0
- data/README.rdoc +65 -0
- data/lib/motion-hockeyapp-task.rb +112 -0
- metadata +60 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 784e8fbeddb2c1945ab807d3cfa41276aba40319
|
4
|
+
data.tar.gz: 2ead53104e171c7b6e3ea77dad0ec62e6a778ec4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6afcd2b7a25307d1e21d0c9a2f23fc239f13596add995d2b605d4340b8e11ce216e792df3e976e9708eab13cd9763f756fdf7318d3a281aab37b0053181f1516
|
7
|
+
data.tar.gz: 0e87eabb798e636ecc5d0aa8f244f95092d0a1e803a0f7035ea56cc0257a6999427ac250d9288471c0794560e58e636395540e53832e3e44abce1d0d60e6cb5c
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014, Joe Noon <joenoon@gmail.com>
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
6
|
+
|
7
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
8
|
+
list of conditions and the following disclaimer.
|
9
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
10
|
+
this list of conditions and the following disclaimer in the documentation
|
11
|
+
and/or other materials provided with the distribution.
|
12
|
+
|
13
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
14
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
15
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
16
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
17
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
18
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
19
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
20
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
21
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
22
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
= motion-hockeyapp-task
|
2
|
+
|
3
|
+
motion-hockeyapp-task allows RubyMotion projects to easily upload
|
4
|
+
builds to the HockeyApp platform.
|
5
|
+
|
6
|
+
*Note: This gem does _not_ add HockeySDK to your project.*
|
7
|
+
If you need that functionality, check https://github.com/joenoon/motion-hockeyapp
|
8
|
+
|
9
|
+
== Installation
|
10
|
+
|
11
|
+
gem 'motion-hockeyapp-task'
|
12
|
+
|
13
|
+
|
14
|
+
== Setup
|
15
|
+
|
16
|
+
Motion::Project::App.setup do |app|
|
17
|
+
app.hockeyapp do
|
18
|
+
set :api_token, '2fc2daaaaaaaaaaaaaaaaaaaaaaaaaaa'
|
19
|
+
set :beta_id, '83be1aaaaaaaaaaaaaaaaaaaaaaaaaaa'
|
20
|
+
set :live_id, '90a35aaaaaaaaaaaaaaaaaaaaaaaaaaa'
|
21
|
+
set :status, "2"
|
22
|
+
set :notify, "0"
|
23
|
+
set :notes_type, "1"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
You can retrieve the values in your HockeyApp account page.
|
28
|
+
Refer to http://support.hockeyapp.net/kb/api/api-upload-new-apps for Upload API options.
|
29
|
+
|
30
|
+
== Usage
|
31
|
+
|
32
|
+
motion-hockeyapp-task introduces a +hockeyapp+ Rake task to your project, which can be used to upload a build. The +notes+ parameter may be provided, and its content will be used as the submission release notes.
|
33
|
+
|
34
|
+
Runs "archive":
|
35
|
+
|
36
|
+
$ notes="release notes here" rake hockeyapp
|
37
|
+
|
38
|
+
Runs "archive:distribution":
|
39
|
+
|
40
|
+
$ notes="release notes here" mode="release" rake hockeyapp
|
41
|
+
|
42
|
+
== License
|
43
|
+
|
44
|
+
Copyright (c) 2014, Joe Noon <joenoon@gmail.com>
|
45
|
+
All rights reserved.
|
46
|
+
|
47
|
+
Redistribution and use in source and binary forms, with or without
|
48
|
+
modification, are permitted provided that the following conditions are met:
|
49
|
+
|
50
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
51
|
+
list of conditions and the following disclaimer.
|
52
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
53
|
+
this list of conditions and the following disclaimer in the documentation
|
54
|
+
and/or other materials provided with the distribution.
|
55
|
+
|
56
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
57
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
58
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
59
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
60
|
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
61
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
62
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
63
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
64
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
65
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@@ -0,0 +1,112 @@
|
|
1
|
+
# Copyright (c) 2014, Joe Noon <joenoon@gmail.com>
|
2
|
+
# All rights reserved.
|
3
|
+
#
|
4
|
+
# Redistribution and use in source and binary forms, with or without
|
5
|
+
# modification, are permitted provided that the following conditions are met:
|
6
|
+
#
|
7
|
+
# 1. Redistributions of source code must retain the above copyright notice,
|
8
|
+
# this list of conditions and the following disclaimer.
|
9
|
+
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
10
|
+
# this list of conditions and the following disclaimer in the documentation
|
11
|
+
# and/or other materials provided with the distribution.
|
12
|
+
#
|
13
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
14
|
+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
15
|
+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
16
|
+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
17
|
+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
18
|
+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
19
|
+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
20
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
21
|
+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
22
|
+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
23
|
+
# POSSIBILITY OF SUCH DAMAGE.
|
24
|
+
|
25
|
+
unless defined?(Motion::Project::Config)
|
26
|
+
raise "This file must be required within a RubyMotion project Rakefile."
|
27
|
+
end
|
28
|
+
|
29
|
+
class HockeyAppConfig
|
30
|
+
|
31
|
+
attr_accessor :api_token, :beta_id, :live_id, :status, :notify, :notes_type
|
32
|
+
|
33
|
+
def set(var, val)
|
34
|
+
send("#{var}=", val)
|
35
|
+
end
|
36
|
+
|
37
|
+
def initialize(config)
|
38
|
+
@config = config
|
39
|
+
end
|
40
|
+
|
41
|
+
def inspect
|
42
|
+
{:api_token => api_token, :beta_id => beta_id, :live_id => live_id, :status => status, :notify => notify, :notes_type => notes_type}.inspect
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
46
|
+
|
47
|
+
module Motion
|
48
|
+
module Project
|
49
|
+
class Config
|
50
|
+
|
51
|
+
variable :hockeyapp
|
52
|
+
|
53
|
+
def hockeyapp(&block)
|
54
|
+
@hockeyapp ||= HockeyAppConfig.new(self)
|
55
|
+
@hockeyapp.instance_eval(&block) unless block.nil?
|
56
|
+
@hockeyapp
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
namespace 'hockeyapp' do
|
64
|
+
desc "Submit an archive to HockeyApp"
|
65
|
+
task :submit do
|
66
|
+
|
67
|
+
# Retrieve configuration settings.
|
68
|
+
prefs = App.config.hockeyapp
|
69
|
+
|
70
|
+
App.fail "A value for app.hockeyapp.api_token is mandatory" unless prefs.api_token
|
71
|
+
|
72
|
+
Rake::Task[App.config_mode == :release ? "archive:distribution" : "archive"].invoke
|
73
|
+
platform = App.config.deploy_platform
|
74
|
+
|
75
|
+
# An archived version of the .dSYM bundle is needed.
|
76
|
+
app_dsym = if App.config.respond_to?(:app_bundle_dsym)
|
77
|
+
App.config.app_bundle_dsym(platform)
|
78
|
+
else
|
79
|
+
App.config.app_bundle(platform).sub(/\.app$/, '.dSYM')
|
80
|
+
end
|
81
|
+
app_dsym_zip = app_dsym + '.zip'
|
82
|
+
if !File.exist?(app_dsym_zip) or File.mtime(app_dsym) > File.mtime(app_dsym_zip)
|
83
|
+
Dir.chdir(File.dirname(app_dsym)) do
|
84
|
+
args = "/usr/bin/zip", "-q", "-r", "#{File.basename(app_dsym)}.zip", File.basename(app_dsym)
|
85
|
+
App.info 'Run', args.join(" ")
|
86
|
+
system(*args)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
prefs.status ||= "2"
|
91
|
+
prefs.notify ||= "0"
|
92
|
+
prefs.notes_type ||= "1"
|
93
|
+
|
94
|
+
cmd = %Q{/usr/bin/curl "https://rink.hockeyapp.net/api/2/apps" -F status="$status" -F notify="$notify" -F notes="$notes" -F notes_type="$notes_type" -F ipa="$ipa" -F dsym="$dsym" -H "$header"}
|
95
|
+
|
96
|
+
env = {
|
97
|
+
"notes" => ENV['notes'].to_s,
|
98
|
+
"status" => prefs.status.to_s,
|
99
|
+
"notify" => prefs.notify.to_s,
|
100
|
+
"notes_type" => prefs.notes_type.to_s,
|
101
|
+
"ipa" => "@#{App.config.archive}",
|
102
|
+
"dsym" => "@#{app_dsym_zip}",
|
103
|
+
"header" => "X-HockeyAppToken: #{prefs.api_token}"
|
104
|
+
}
|
105
|
+
App.info 'Run', "#{env.inspect} #{cmd}"
|
106
|
+
system(env, cmd)
|
107
|
+
end
|
108
|
+
|
109
|
+
end
|
110
|
+
|
111
|
+
desc 'Alias for hockeyapp:submit'
|
112
|
+
task 'hockeyapp' => 'hockeyapp:submit'
|
metadata
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: motion-hockeyapp-task
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Joe Noon
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-11-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: motion-cocoapods
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.4.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.4.1
|
27
|
+
description: motion-hockeyapp-task allows RubyMotion projects to easily upload builds
|
28
|
+
to the HockeyApp platform.
|
29
|
+
email: joenoon@gmail.com
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- README.rdoc
|
35
|
+
- LICENSE
|
36
|
+
- lib/motion-hockeyapp-task.rb
|
37
|
+
homepage: http://www.rubymotion.com
|
38
|
+
licenses: []
|
39
|
+
metadata: {}
|
40
|
+
post_install_message:
|
41
|
+
rdoc_options: []
|
42
|
+
require_paths:
|
43
|
+
- lib
|
44
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - '>='
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
requirements: []
|
55
|
+
rubyforge_project:
|
56
|
+
rubygems_version: 2.0.14
|
57
|
+
signing_key:
|
58
|
+
specification_version: 4
|
59
|
+
summary: HockeyApp upload task for RubyMotion projects
|
60
|
+
test_files: []
|