changed CHANGELOG.md
 
@@ -1,5 +1,16 @@
1
1
# Changelog
2
2
3
+ ## v0.11.0
4
+
5
+ * Breaking Changes
6
+ * This release includes a change to how CA certificates are used in the connection
7
+ to NervesHub. If you are connecting to the publicly hosted https://nerves-hub.org,
8
+ then no changes are required.
9
+ If you are manually supplying `:ca_certs` config value to connect to another instance
10
+ of NervesHub, then you will need to update you config following the new instructions
11
+ for [Configuration](https://github.com/nerves-hub/nerves_hub_user_api#configuration)
12
+ in the NervesHubUserAPI README.
13
+
3
14
## v0.10.5
4
15
5
16
* Bug Fixes
changed README.md
 
@@ -54,3 +54,11 @@ automation. The following variables are available:
54
54
55
55
For more information on using the CLI, see the
56
56
[`nerves_hub_link`](https://github.com/nerves-hub/nerves_hub_link) documentation.
57
+
58
+
59
+ ## Connecting to other environments
60
+
61
+ NervesHubCLI can be directed to target other environments beside the public
62
+ NervesHub instance. See the
63
+ [documentation](https://docs.nerves-hub.org/nerves-hub/setup/connecting-other-envs)
64
+ for example config values to do this.
changed hex_metadata.config
 
@@ -4,20 +4,20 @@
4
4
{<<"elixir">>,<<"~> 1.6">>}.
5
5
{<<"files">>,
6
6
[<<"lib">>,<<"lib/nerves_hub_cli.ex">>,<<"lib/mix">>,
7
- <<"lib/mix/nerves_hub">>,<<"lib/mix/nerves_hub/bulk.ex">>,
8
- <<"lib/mix/nerves_hub/shell.ex">>,<<"lib/mix/nerves_hub/utils.ex">>,
9
- <<"lib/mix/tasks">>,<<"lib/mix/tasks/nerves_hub.key.ex">>,
7
+ <<"lib/mix/nerves_hub">>,<<"lib/mix/nerves_hub/shell.ex">>,
8
+ <<"lib/mix/nerves_hub/bulk.ex">>,<<"lib/mix/nerves_hub/utils.ex">>,
9
+ <<"lib/mix/tasks">>,<<"lib/mix/tasks/nerves_hub.org.ex">>,
10
10
<<"lib/mix/tasks/nerves_hub.device.ex">>,
11
- <<"lib/mix/tasks/nerves_hub.product.ex">>,
12
- <<"lib/mix/tasks/nerves_hub.org.ex">>,
13
- <<"lib/mix/tasks/nerves_hub.ca_certificate.ex">>,
14
11
<<"lib/mix/tasks/nerves_hub.user.ex">>,
15
- <<"lib/mix/tasks/nerves_hub.deployment.ex">>,
16
- <<"lib/mix/tasks/nerves_hub.firmware.ex">>,<<"lib/nerves_hub_cli">>,
17
- <<"lib/nerves_hub_cli/certificate.ex">>,<<"lib/nerves_hub_cli/crypto.ex">>,
18
- <<"lib/nerves_hub_cli/key.ex">>,<<"lib/nerves_hub_cli/config.ex">>,
19
- <<"lib/nerves_hub_cli/user.ex">>,<<"lib/nerves_hub_cli/cmd.ex">>,
20
- <<"lib/nerves_hub_cli/device.ex">>,<<"lib/nerves_hub_cli/application.ex">>,
12
+ <<"lib/mix/tasks/nerves_hub.product.ex">>,
13
+ <<"lib/mix/tasks/nerves_hub.key.ex">>,
14
+ <<"lib/mix/tasks/nerves_hub.ca_certificate.ex">>,
15
+ <<"lib/mix/tasks/nerves_hub.firmware.ex">>,
16
+ <<"lib/mix/tasks/nerves_hub.deployment.ex">>,<<"lib/nerves_hub_cli">>,
17
+ <<"lib/nerves_hub_cli/application.ex">>,<<"lib/nerves_hub_cli/key.ex">>,
18
+ <<"lib/nerves_hub_cli/crypto.ex">>,<<"lib/nerves_hub_cli/device.ex">>,
19
+ <<"lib/nerves_hub_cli/config.ex">>,<<"lib/nerves_hub_cli/cmd.ex">>,
20
+ <<"lib/nerves_hub_cli/certificate.ex">>,<<"lib/nerves_hub_cli/user.ex">>,
21
21
<<".formatter.exs">>,<<"mix.exs">>,<<"README.md">>,<<"LICENSE">>,
22
22
<<"CHANGELOG.md">>]}.
23
23
{<<"licenses">>,[<<"Apache-2.0">>]}.
 
@@ -39,15 +39,15 @@
39
39
{<<"name">>,<<"nerves_hub_user_api">>},
40
40
{<<"optional">>,false},
41
41
{<<"repository">>,<<"hexpm">>},
42
- {<<"requirement">>,<<"~> 0.7.1">>}],
42
+ {<<"requirement">>,<<"~> 0.8.0">>}],
43
43
[{<<"app">>,<<"table_rex">>},
44
44
{<<"name">>,<<"table_rex">>},
45
45
{<<"optional">>,false},
46
46
{<<"repository">>,<<"hexpm">>},
47
- {<<"requirement">>,<<"~> 2.0.0 or ~> 3.0.0">>}],
47
+ {<<"requirement">>,<<"~> 2.0.0 or ~> 3.0">>}],
48
48
[{<<"app">>,<<"nimble_csv">>},
49
49
{<<"name">>,<<"nimble_csv">>},
50
50
{<<"optional">>,false},
51
51
{<<"repository">>,<<"hexpm">>},
52
52
{<<"requirement">>,<<"~> 0.7 or ~> 1.1">>}]]}.
53
- {<<"version">>,<<"0.10.5">>}.
53
+ {<<"version">>,<<"0.11.0">>}.
changed lib/mix/tasks/nerves_hub.device.ex
 
@@ -181,8 +181,6 @@ defmodule Mix.Tasks.NervesHub.Device do
181
181
csv: :string
182
182
]
183
183
184
- @data_dir "nerves-hub"
185
-
186
184
@spec run([String.t()]) :: :ok | no_return()
187
185
def run(args) do
188
186
_ = Application.ensure_all_started(:nerves_hub_cli)
 
@@ -367,7 +365,7 @@ defmodule Mix.Tasks.NervesHub.Device do
367
365
368
366
@spec burn(String.t(), keyword()) :: :ok
369
367
def burn(identifier, opts) do
370
- path = opts[:path] || Path.join(File.cwd!(), @data_dir)
368
+ path = opts[:path] || NervesHubCLI.home_dir()
371
369
cert_path = opts[:cert]
372
370
key_path = opts[:key]
373
371
 
@@ -432,7 +430,7 @@ defmodule Mix.Tasks.NervesHub.Device do
432
430
) :: :ok
433
431
def cert_create(org, product, identifier, opts, auth \\ nil) do
434
432
Shell.info("Creating certificate for #{identifier}")
435
- path = opts[:path] || Path.join(File.cwd!(), @data_dir)
433
+ path = opts[:path] || NervesHubCLI.home_dir()
436
434
File.mkdir_p!(path)
437
435
438
436
key = X509.PrivateKey.new_ec(:secp256r1)
changed lib/mix/tasks/nerves_hub.key.ex
 
@@ -89,7 +89,6 @@ defmodule Mix.Tasks.NervesHub.Key do
89
89
path: :string,
90
90
local: :boolean
91
91
]
92
- @data_dir "nerves-hub"
93
92
94
93
def run(args) do
95
94
_ = Application.ensure_all_started(:nerves_hub_cli)
 
@@ -234,7 +233,7 @@ defmodule Mix.Tasks.NervesHub.Key do
234
233
end
235
234
236
235
def export(key, org, opts) do
237
- path = opts[:path] || Path.join(File.cwd!(), @data_dir)
236
+ path = opts[:path] || NervesHubCLI.home_dir()
238
237
239
238
with :ok <- File.mkdir_p(path),
240
239
{:ok, public_key, private_key} <- Shell.request_keys(org, key),
changed lib/mix/tasks/nerves_hub.user.ex
 
@@ -51,7 +51,6 @@ defmodule Mix.Tasks.NervesHub.User do
51
51
"""
52
52
53
53
@switches [path: :string]
54
- @data_dir "nerves-hub"
55
54
56
55
def run(args) do
57
56
_ = Application.ensure_all_started(:nerves_hub_cli)
 
@@ -156,7 +155,7 @@ defmodule Mix.Tasks.NervesHub.User do
156
155
end
157
156
158
157
def cert_export(opts) do
159
- path = opts[:path] || Path.join(File.cwd!(), @data_dir)
158
+ path = opts[:path] || NervesHubCLI.home_dir()
160
159
password = Shell.password_get("Local user password:")
161
160
162
161
with :ok <- File.mkdir_p(path),
changed mix.exs
 
@@ -1,7 +1,7 @@
1
1
defmodule NervesHubCLI.MixProject do
2
2
use Mix.Project
3
3
4
- @version "0.10.5"
4
+ @version "0.11.0"
5
5
@source_url "https://github.com/nerves-hub/nerves_hub_cli"
6
6
7
7
def project do
 
@@ -44,11 +44,11 @@ defmodule NervesHubCLI.MixProject do
44
44
[
45
45
{:pbcs, "~> 0.1"},
46
46
{:x509, "~> 0.3"},
47
- {:nerves_hub_user_api, "~> 0.7.1"},
48
- {:table_rex, "~> 2.0.0 or ~> 3.0.0"},
47
+ {:nerves_hub_user_api, "~> 0.8.0"},
48
+ {:table_rex, "~> 2.0.0 or ~> 3.0"},
49
49
{:nimble_csv, "~> 0.7 or ~> 1.1"},
50
50
{:ex_doc, "~> 0.22", only: :docs, runtime: false},
51
- {:dialyxir, "~> 1.0.0", only: [:dev, :test], runtime: false}
51
+ {:dialyxir, "~> 1.1.0", only: [:dev, :test], runtime: false}
52
52
]
53
53
end