Skip to content

Commit

Permalink
v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ghitchens committed May 4, 2017
1 parent 79df6a5 commit 9e4e38a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v0.4.0 (2017-05-04)

- Support chunked streaming direct to fwup (thanks @mobileoverlord and @fhunleth)
- Support fwup's signing process for firmware (thanks @connorrigby)
- Add finalize/1 (mostly to support `nerves_firmware_http` streaming state)

## v0.3.0 (2017-02-22)

- Converted compile-time config to runtime
Expand Down
6 changes: 3 additions & 3 deletions lib/firmware.ex
Original file line number Diff line number Diff line change
Expand Up @@ -132,18 +132,18 @@ defmodule Nerves.Firmware do
end

@doc """
Apply a 1 or 2-phase nerves update
Applies /tmp/finalize.fw if with `on-reboot` task if exists,
* `args` is a list of extra arguments to be passed to fwup.
* `args` is a list of extra arguments to be passed to fwup, but is currently
ignored for this function.
Returns {:error, :await_restart} if the finalize is requested after
already updating an image without a reboot in-between.
"""
@spec finalize(args) :: :ok | {:error, reason}
def finalize(args \\ []) do
args = maybe_pub_key_args(args)
# REVIEW args is ignored by the server for this call. What should they do?
GenServer.call @server, {:finalize, args}, :infinity
end

Expand Down
2 changes: 1 addition & 1 deletion lib/firmware/server.ex
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ defmodule Nerves.Firmware.Server do
end
end

def do_finalize(args, state) do
def do_finalize(_args, state) do
finalize_fw = Application.get_env(:nerves_firmware, :finalize_fw, "/tmp/finalize.fw")
if File.exists?(finalize_fw) do
Logger.info "Found #{finalize_fw}, applying finalize/on-reboot"
Expand Down
4 changes: 2 additions & 2 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Nerves.Firmware.Mixfile do
use Mix.Project

@version "0.3.0"
@version "0.4.0"

def project do
[
Expand Down Expand Up @@ -35,7 +35,7 @@ defmodule Nerves.Firmware.Mixfile do
end

defp package do
[ maintainers: ["Justin Schneck", "Garth Hitchens"],
[ maintainers: ["Garth Hitchens", "Justin Schneck"],
licenses: ["Apache-2.0"],
links: %{github: "https://github.com/nerves-project/nerves_firmware"}]
end
Expand Down
4 changes: 2 additions & 2 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%{"cowboy": {:hex, :cowboy, "1.0.4"},
"cowlib": {:hex, :cowlib, "1.0.2"},
"earmark": {:hex, :earmark, "1.1.1", "433136b7f2e99cde88b745b3a0cfc3fbc81fe58b918a09b40fce7f00db4d8187", [:mix], []},
"ex_doc": {:hex, :ex_doc, "0.15.0", "e73333785eef3488cf9144a6e847d3d647e67d02bd6fdac500687854dd5c599f", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, optional: false]}]},
"earmark": {:hex, :earmark, "1.2.1", "7ad3f203ab84d31832814483c834e006cf88949f061a4b50d7e783147572280f", [:mix], []},
"ex_doc": {:hex, :ex_doc, "0.15.1", "d5f9d588fd802152516fccfdb96d6073753f77314fcfee892b15b6724ca0d596", [:mix], [{:earmark, "~> 1.1", [hex: :earmark, optional: false]}]},
"exjsx": {:hex, :exjsx, "3.2.0"},
"httpotion": {:git, "https://github.com/myfreeweb/httpotion.git", "98130b47957a595008fe415ac4d4d08cdc5f5ede", []},
"ibrowse": {:hex, :ibrowse, "4.2.2"},
Expand Down

0 comments on commit 9e4e38a

Please sign in to comment.