@@ -44,7 +44,6 @@ defmodule Nerves.Package do
44
44
config: Keyword . t ( )
45
45
}
46
46
47
- @ package_config "nerves.exs"
48
47
@ required [ :type , :version , :platform ]
49
48
50
49
@ doc """
@@ -61,7 +60,7 @@ defmodule Nerves.Package do
61
60
if ! type do
62
61
Mix . shell ( ) . error (
63
62
"The Nerves package #{ app } does not define a type.\n \n " <>
64
- "Verify that the key exists in ' #{ config_path ( path ) } ' .\n "
63
+ "Verify that the key exists.\n "
65
64
)
66
65
67
66
exit ( { :shutdown , 1 } )
@@ -120,44 +119,18 @@ defmodule Nerves.Package do
120
119
pkg . build_runner . shell ( pkg )
121
120
end
122
121
123
- @ doc """
124
- Takes the path to the package and returns the path to its package config.
125
- """
126
- @ spec config_path ( String . t ( ) ) :: String . t ( )
127
- def config_path ( path ) do
128
- Path . join ( path , @ package_config )
129
- end
130
-
131
122
@ doc """
132
123
Get Mix.Project config for an application
133
124
"""
134
125
@ spec config ( Application . app ( ) , Path . t ( ) ) :: Keyword . t ( )
135
126
def config ( app , path ) do
136
- project_config =
137
- if app == Mix.Project . config ( ) [ :app ] do
127
+ if app == Mix.Project . config ( ) [ :app ] do
128
+ Mix.Project . config ( )
129
+ else
130
+ Mix.Project . in_project ( app , path , fn _mod ->
138
131
Mix.Project . config ( )
139
- else
140
- Mix.Project . in_project ( app , path , fn _mod ->
141
- Mix.Project . config ( )
142
- end )
143
- end
144
-
145
- nerves_package =
146
- case project_config [ :nerves_package ] do
147
- nil ->
148
- # TODO: Deprecated. Clean up after 1.0
149
- Mix . shell ( ) . raise ( """
150
- Nerves configuration has moved from nerves.exs to mix.exs.
151
-
152
- Use `mix nerves.new` to regenerate your project's mix.exs and merge
153
- your code into the new project.
154
- """ )
155
-
156
- nerves_package ->
157
- nerves_package
158
- end
159
-
160
- Keyword . put ( project_config , :nerves_package , nerves_package )
132
+ end )
133
+ end
161
134
end
162
135
163
136
defp dep_type ( pkg ) do
0 commit comments