roku_builder 3.12.7 → 3.12.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +13 -0
- data/Gemfile.lock +3 -3
- data/README.md +60 -12
- data/lib/roku_builder/keyer.rb +2 -2
- data/lib/roku_builder/version.rb +1 -1
- data/roku_builder.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a562753d6f0b7fb5e05b78835ac660754faddda
|
4
|
+
data.tar.gz: 3c4fbf513f28f9f1c59b5776497be3b9ea626f65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a44be2123c1949593a9221855c8e7feb3b4df08d17c5ed4aa316de2c95d25b34e31ad165a947064dbf86c2d089379ce8005df2d899334ae20dffb87bbe9641ec
|
7
|
+
data.tar.gz: 55ca8895e575e0ffc84170920821430e03081c1388bc171310b920b9827f6676e0a6ae867e06e6b97e5afcf813977abfcb3a3d52ac4d280fe107a8f7686a5d78
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
= 3.12.8 =
|
2
|
+
|
3
|
+
- Always print password/path from genkey
|
4
|
+
- Update dependancies
|
5
|
+
- Update README
|
6
|
+
|
7
|
+
= 3.12.7 =
|
8
|
+
|
9
|
+
- Ensure in file/dir is expanded
|
10
|
+
- Ensure project dirs exist
|
11
|
+
- Ensure key file exist
|
12
|
+
- Fix bug with print
|
13
|
+
|
1
14
|
= 3.12.6 =
|
2
15
|
|
3
16
|
- Update dependancies
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
roku_builder (3.12.
|
5
|
-
faraday (~> 0.
|
4
|
+
roku_builder (3.12.8)
|
5
|
+
faraday (~> 0.12)
|
6
6
|
faraday-digestauth (~> 0.2)
|
7
7
|
git (~> 1.3)
|
8
8
|
net-ping (~> 2.0)
|
@@ -22,7 +22,7 @@ GEM
|
|
22
22
|
thor (~> 0.19.4)
|
23
23
|
tins (~> 1.6)
|
24
24
|
docile (1.1.5)
|
25
|
-
faraday (0.
|
25
|
+
faraday (0.12.0.1)
|
26
26
|
multipart-post (>= 1.2, < 3)
|
27
27
|
faraday-digestauth (0.2.1)
|
28
28
|
faraday (~> 0.7)
|
data/README.md
CHANGED
@@ -115,16 +115,15 @@ with the --debug option on to see a print out of all the keys pressed.
|
|
115
115
|
|
116
116
|
Official docs for packaging an application can be found [in the sdk](https://sdkdocs.roku.com/display/sdkdoc/Packaging+Your+Application), however the basic steps are:
|
117
117
|
|
118
|
-
1. Side-load your application onto a Roku device for testing.
|
119
118
|
1. Run the genkey utility to generate a key. This key will sign packages. This step only needs to be done once.
|
120
|
-
1.
|
121
|
-
1.
|
119
|
+
1. Add the key to your configuration file. This will also only need to be done once.
|
120
|
+
1. Run the package utility to generate package. This will create a .pkg file in /tmp.
|
122
121
|
|
123
122
|
RokuBuilder makes running each of these steps easy, without needing to use the Roku device web interface or telnet.
|
124
123
|
|
125
124
|
#### Projects and Stages
|
126
125
|
|
127
|
-
The configuration for this gem allows you to define any number of
|
126
|
+
The configuration for this gem allows you to define any number of projects and
|
128
127
|
any number of stages for each project. It is intended that each app be defined
|
129
128
|
as a project and then the stages for that project would allow you to define
|
130
129
|
production/staging/etc. stages.
|
@@ -165,12 +164,8 @@ you are trying to run the command. The options are as follows:
|
|
165
164
|
command on a specific git branch, tag, or referance.
|
166
165
|
* --stage or -s
|
167
166
|
* This option will work with either git or script staging. It allows you to
|
168
|
-
sideload a specific stage.
|
169
|
-
|
170
|
-
script after. If using git staging it will stach any local changes,
|
171
|
-
switch to the configured branch, sideload, switch back to the previous
|
172
|
-
branch, and unstach changes. This is the only source option that you can
|
173
|
-
use when packaging.
|
167
|
+
sideload a specific stage. See below for more information. This is the
|
168
|
+
only source option that you can use when packaging.
|
174
169
|
* --working or -w
|
175
170
|
* This option will work with git or script staging. It will use the project
|
176
171
|
configs to determine the directory to use but will not run any staging
|
@@ -181,6 +176,60 @@ you are trying to run the command. The options are as follows:
|
|
181
176
|
* --in or -I
|
182
177
|
* This option allows you to pass in a zip file of an already built app.
|
183
178
|
|
179
|
+
#### Staging
|
180
|
+
|
181
|
+
It is usually a good idea to have multiple versions of your roku app. For
|
182
|
+
example you could have a production and staging version of your app. RokuBuilder
|
183
|
+
allows for this by using stages. There are two methods of staging, git, or
|
184
|
+
script.
|
185
|
+
|
186
|
+
If you choose to stage via git then for each stage you will define a git branch
|
187
|
+
or ref. While staging (like durning packaging) RokuBuilder will stash all
|
188
|
+
changes, checkout the defined branch, complete the requested action, checkout
|
189
|
+
the orginal branch, and pop stashed changes.
|
190
|
+
|
191
|
+
If you choose to use script staging then for each stage you will define a
|
192
|
+
script to run that will change the app directory approiatly for that stage.
|
193
|
+
You may also optionally define an unstage script that will return the directory
|
194
|
+
to a clean working state. The script can be anything that will run in the
|
195
|
+
project directory.
|
196
|
+
|
197
|
+
A script staging example would be if you have a shell script (stage.sh) that
|
198
|
+
append a config url in your manifest. You would have a different url for each
|
199
|
+
stage:
|
200
|
+
|
201
|
+
#! /bin/bash
|
202
|
+
if [ "production" = $1 ]; then
|
203
|
+
echo "url=https://prod.url.com" >> manifest
|
204
|
+
else
|
205
|
+
echo "url=https://staging.url.com" >> manifest
|
206
|
+
fi
|
207
|
+
|
208
|
+
You could also have a script (unstage.sh) that removed that last line:
|
209
|
+
|
210
|
+
#! /bin/bash
|
211
|
+
mv manifest manifest.tmp
|
212
|
+
head -n -1 manifest.tmp > manifest
|
213
|
+
rm manifest.tmp
|
214
|
+
|
215
|
+
In your config you could have the following two stages assuming that these
|
216
|
+
scripts were in the project root directory:
|
217
|
+
|
218
|
+
"stages": {
|
219
|
+
"prod": {
|
220
|
+
"script": {"stage": "./stage.sh production", "unstage": "./unstage"}
|
221
|
+
}
|
222
|
+
"staging": {
|
223
|
+
"script": {"stage": "./stage.sh staging", "unstage": "./unstage"}
|
224
|
+
}
|
225
|
+
}
|
226
|
+
|
227
|
+
This would allow you to use the following two commands:
|
228
|
+
|
229
|
+
$ roku -ls prod
|
230
|
+
$ roku -ls staging
|
231
|
+
|
232
|
+
This would sideload the app with the approiate url in the manifest.
|
184
233
|
|
185
234
|
#### Sideloading
|
186
235
|
|
@@ -219,13 +268,12 @@ also needed to sign a package when updating a channel.
|
|
219
268
|
|
220
269
|
You can create a key by running the genkey command:
|
221
270
|
|
222
|
-
$ roku --genkey
|
271
|
+
$ roku --genkey
|
223
272
|
|
224
273
|
This will output the following data, all of which need to put in the `keys` section of `~/.roku_config.json`:
|
225
274
|
|
226
275
|
* `Keyed PKG`: This is the signing key, used to sign new and updated packages
|
227
276
|
* `Password`: Key's password
|
228
|
-
* `DevID`: The developer ID associated with the key. Don't need to save this, but it is best practice to include this string in the signing keys filename
|
229
277
|
|
230
278
|
#### Packaging
|
231
279
|
|
data/lib/roku_builder/keyer.rb
CHANGED
@@ -7,7 +7,7 @@ module RokuBuilder
|
|
7
7
|
|
8
8
|
def genkey(out_file: nil)
|
9
9
|
password, dev_id = generate_new_key()
|
10
|
-
@logger.
|
10
|
+
@logger.unknown("Password: "+password)
|
11
11
|
@logger.info("DevID: "+dev_id)
|
12
12
|
|
13
13
|
unless out_file
|
@@ -28,7 +28,7 @@ module RokuBuilder
|
|
28
28
|
@device_config.delete(:init_params)
|
29
29
|
packager = Packager.new(**@device_config)
|
30
30
|
packager.package(app_name_version: "key_"+dev_id, out_file: out_file, password: password)
|
31
|
-
@logger.
|
31
|
+
@logger.unknown("Keyed PKG: "+out_file)
|
32
32
|
}
|
33
33
|
end
|
34
34
|
|
data/lib/roku_builder/version.rb
CHANGED
data/roku_builder.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.required_ruby_version = "~> 2.3"
|
22
22
|
|
23
23
|
spec.add_dependency "rubyzip", "~> 1.2"
|
24
|
-
spec.add_dependency "faraday", "~> 0.
|
24
|
+
spec.add_dependency "faraday", "~> 0.12"
|
25
25
|
spec.add_dependency "faraday-digestauth", "~> 0.2"
|
26
26
|
spec.add_dependency "git", "~> 1.3"
|
27
27
|
spec.add_dependency "net-ping", "~> 2.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roku_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.12.
|
4
|
+
version: 3.12.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- greeneca
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.12'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0.
|
40
|
+
version: '0.12'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: faraday-digestauth
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|