Skip to content

Commit

Permalink
Fix sideloading to device without sideload
Browse files Browse the repository at this point in the history
  • Loading branch information
greeneca committed Feb 1, 2018
1 parent 1367610 commit 131a342
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG
@@ -1,4 +1,8 @@
= 4.5.0
= 4.5.1 =

- Fix sideloading to device without currently sideloaded app

= 4.5.0 =

- Delete sideloaded app before each sideload
- Allow config to be re-parsed with specific stage
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
roku_builder (4.5.0)
roku_builder (4.5.1)
faraday (~> 0.13)
faraday-digestauth (~> 0.2)
git (~> 1.3)
Expand Down
6 changes: 3 additions & 3 deletions lib/roku_builder/plugins/loader.rb
Expand Up @@ -37,7 +37,7 @@ def self.dependencies

# Sideload an app onto a roku device
def sideload(options:)
delete(options: options)
delete(options: options, ignoreFailure: true)
did_build = false
unless options[:in]
did_build = true
Expand All @@ -58,10 +58,10 @@ def build(options:)
end

# Remove the currently sideloaded app
def delete(options:)
def delete(options:, ignoreFailure: false)
payload = {mysubmit: "Delete", archive: ""}
response = multipart_connection.post "/plugin_install", payload
unless response.status == 200 and response.body =~ /Delete Succeeded/
unless response.status == 200 and response.body =~ /Delete Succeeded/ or ignoreFailure
raise ExecutionError, "Failed Unloading"
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/roku_builder/version.rb
Expand Up @@ -2,5 +2,5 @@

module RokuBuilder
# Version of the RokuBuilder Gem
VERSION = "4.5.0"
VERSION = "4.5.1"
end

0 comments on commit 131a342

Please sign in to comment.