v0.9.0
- Update Notes
Starting in Nerves v0.9.0, artifacts will no longer be fetched during
mix compile
. Artifact archives are intended to be fetched following mix deps.get
.
To handle this, you will need to update your installed version of nerves_bootstrap
by
calling mix local.nerves
. After updating nerves_bootstrap
, you should update
your mix.exs
file to add the new required mix aliases found there. A helper
function is available named Nerves.Bootstrap.add_aliases
that you can pipe your
existing aliases to like this:
defp aliases(_target) do
[
# Add custom mix aliases here
]
|> Nerves.Bootstrap.add_aliases()
end
Also, update your nerves dependency to:
{:nerves, "~> 0.9", runtime: false}
-
API Changes
- Moved
Nerves.Package.Providers
toNerves.Artifact.Providers
- Moved
Nerves.Package.Providers.HTTP
toNerves.Artifact.Resolver
Nerves.Artifact.Resolver
no longer implements the
Nerves.Artifact.Provider
behaviour.
- Moved
-
Enhancements
-
Added Mix task
nerves.artifact.get
. Use to fetch the artifact archive from an
artifact_url
location. Once downloaded its checksum will be checked against
artifact_checksum
from thenerves_package
config inmix.exs
. The Mix task
nerves.deps.get
will recursively callnerves.artifact.get
to fetch archives. -
Added Mix task
nerves.artifact.archive
. This task will produce the
artifact archive and artifact checksum file which are used when calling
nerves.artifact.get
. -
Nerves packages can override the Provider in the
nerves_package
config
inmix.exs
using the keysprovider
andprovider_opts
. This is
useful to force a package to build using a specific provider like
Nerves.Artifact.Providers.Docker
. See the package configuration docs
for more information. -
Added
artifact_sites
to thenerves_package
config. Artifact sites
are helpers that are useful for cleanly specifying locations where artifacts
can be fetched. If you are hosting your artifacts using Github relases
you can specify it like this:artifact_sites: [ {:github_releases, "orginization/project"} ]
You can also specify your own custom server location by using the
:prefix
helper by passing a url or file path:artifact_sites: [ {:prefix, "/path/to/artifacts"}, {:prefix, "https://my_bucket.s3-east.amazonaws.com/artifacts"} ]
Artifact sites will be tried in order until one successfully downloads the
artifact.
-
-
Bug Fixes
- Fixed issue with
Nerves.Utils.HTTPResolver
crashing when missing the
content-disposition
andcontent-length
headers. - Run integrity check on tar files to validate they are not corrupted on
download.
- Fixed issue with