Skip to content

Commit

Permalink
Update mix.exs target
Browse files Browse the repository at this point in the history
  • Loading branch information
mobileoverlord committed Feb 12, 2021
1 parent b07f58e commit a770af6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ defmodule NervesSystemGiantBoard.MixProject do
end

defp bootstrap(args) do
System.put_env("MIX_TARGET", "giant")
set_target()
Application.start(:nerves_bootstrap)
Mix.Task.run("loadconfig", args)
end
Expand Down Expand Up @@ -101,4 +101,12 @@ defmodule NervesSystemGiantBoard.MixProject do
"VERSION"
]
end

defp set_target() do
if function_exported?(Mix, :target, 1) do
apply(Mix, :target, [:target])
else
System.put_env("MIX_TARGET", "target")
end
end
end

0 comments on commit a770af6

Please sign in to comment.