For package management rebar3
uses hex.pm, a package manager for Erlang and Elixir packages. For instructions on publishing your package see the Publishing Packages tutorial. Below is an entry for each subtask of the hex
namespace and what it does.
config []
Reads or updates hex configuration file.
Key | Description |
---|---|
username | Hex username |
key | Hex API key |
api_url | Hex API base URL |
cdn_url | Hex CDN base URL |
http_proxy | HTTP proxy server |
https_proxy | HTTPS proxy server |
cut
Increment version number and publish package.
You'll be asked what type of increment to make to the version or it can be supplied as an argument to the command -i major|minor|patch
.
docs
Publishes documentation for the current project and version.
The documentation will be accessible at http://hexdocs.pm/my_package/1.0.0
, http://hexdocs.pm/my_package
will always redirect to the latest published version.
Documentation will be generated by running the rebar3 hex docs
task, which publishes documentation it generates through rebar3 edoc
. docs
provides this task by default, but any library can be used. Or an alias can be used to extend the documentation generation. The expected result of the task is the generated documentation located in the docs/
directory with an index.html
file.
Delete previously uploaded docs
--revert <version>
info [ []]
Prints hex package or system information.
If package
is not given, print system information. This includes when registry was last updated and current system version.
If package
is given, print information about the package. This includes all released versions and package metadata.
If package
and version is given print release information. This includes remote Git URL and Git ref, and all package dependencies.
key
Remove or list API keys associated with your account.
Remove Key
Remove given API key from account. The key can no longer be used to authenticate API requests.
rebar3 hex key remove <key_name>
List Keys
List all API keys associated with your account.
rebar3 hex key list
publish
Publish a new version of your package and update the package.
rebar3 hex publish
If it is a new package being published it will be created and the user specified in username
will be the package owner. Only package owners can publish.
A published version can be amended or reverted with --revert
up to one hour after its publication. If you want to revert a publication that is more than one hour old you need to contact an administrator.
owner
Add, remove or list package owners.
A package owner have full permissions to the package. They can publish and revert releases and even remove other package owners.
Add owner
Add an owner to package by specifying the package name and email of the new owner.
rebar3 hex owner add <package> <email>
Remove owner
Remove an owner to package by specifying the package name and email of the new owner.
`rebar3 hex owner remove
List owners
List all owners of given package.
rebar3 hex owner list <package>
user
Hex user tasks.
Registers a new user
rebar3 hex user register
Prints the current user
rebar3 hex user whoami
Authorize a new user
Authorizes a new user on the local machine by generating a new API key and storing it in the hex config.
rebar3 hex user auth
Deauthorize the user
Deauthorizes the user from the local machine by removing the API key from the hex config.
rebar3 hex user deauth
Reset user password
rebar3 hex user reset_password
search
Display packages matching the given search query.
rebar3 hex search <term>
Updated 2 years ago