Skip to content

Commit

Permalink
Added support for 0.4.0 nerves-system
Browse files Browse the repository at this point in the history
  • Loading branch information
mobileoverlord committed Mar 3, 2016
1 parent b02a5ba commit 03c50b8
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Release Notes

## Nerves 0.2.0
* Enhancements
* Added support for 0.4.0 system paths
8 changes: 7 additions & 1 deletion lib/nerves/release.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
defmodule ReleaseManager.Plugin.Nerves do
use ReleaseManager.Plugin

@vsn1 "/buildroot/output/staging/usr/lib/erlang/lib"
@vsn2 "/staging/usr/lib/erlang/lib"

def before_release(%Config{} = config) do
case System.get_env("NERVES_SYSTEM") do
nil -> config
Expand All @@ -13,12 +16,15 @@ defmodule ReleaseManager.Plugin.Nerves do
_ -> false
end)
relx_config = [{:include_erts, false} | relx_config]
relx_config = [{:system_libs, String.to_char_list("#{system}/buildroot/output/staging/usr/lib/erlang/lib")} | relx_config]
relx_config = [{:system_libs, String.to_char_list(system_libs(system))} | relx_config]
config = %{config | relx_config: relx_config}
end
end

def after_release(_), do: nil
def after_package(_), do: nil
def after_cleanup(_args), do: nil

defp system_libs(system),
do: system <> if File.dir?(system <> @vsn2), do: @vsn2, else: @vsn1
end
21 changes: 15 additions & 6 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,25 @@ defmodule Nerves.Mixfile do

def project do
[app: :nerves,
version: "0.1.0",
name: "Nerves",
source_url: "https://github.com/nerves-project/nerves",
homepage_url: "http://nerves-project.org/",
version: "0.2.0",
elixir: "~> 1.2",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps]
deps: deps,
description: description,
package: package,
docs: [logo: "resources/logo.png",
extras: ["README.md"]]]
end

# Configuration for the OTP application
#
# Type "mix help compile.app" for more information
def application do
[applications: []]
[]
end

# Dependencies can be Hex packages:
Expand All @@ -28,19 +35,21 @@ defmodule Nerves.Mixfile do
# Type "mix help deps" for more examples and options
defp deps do
[
{:exrm, github: "bitwalker/exrm", tag: "4c2b476aa25f35961abb783ba64433fe509fff82"}
{:exrm, "~> 1.0"},
{:earmark, "~> 0.1", only: :dev},
{:ex_doc, "~> 0.11", only: :dev}
]
end

defp description do
"""
Nerves - Create firmware for embedded devices like Raspberry Pi and more
Nerves - Create firmware for embedded devices like Raspberry Pi, BeagleBone Black, and more
"""
end

defp package do
[maintainers: ["Frank Hunleth", "Garth Hitchens", "Justin Schneck"],
licenses: ["MIT"],
licenses: ["Apache 2.0"],
links: %{"Github" => "https://github.com/nerves-project/nerves"}]
end
end
4 changes: 3 additions & 1 deletion mix.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
%{"bbmustache": {:hex, :bbmustache, "1.0.3"},
"earmark": {:hex, :earmark, "0.2.1"},
"erlware_commons": {:hex, :erlware_commons, "0.15.0"},
"exrm": {:hex, :exrm, "1.0.0-rc7"},
"ex_doc": {:hex, :ex_doc, "0.11.4"},
"exrm": {:hex, :exrm, "1.0.2"},
"getopt": {:hex, :getopt, "0.8.2"},
"providers": {:hex, :providers, "1.4.1"},
"relx": {:hex, :relx, "3.5.0"}}

0 comments on commit 03c50b8

Please sign in to comment.