Code Monkey home page Code Monkey logo

rebar3_hex's Introduction

rebar3 Hex Providers GitHub Actions CI Coverage

Providers for interacting with the Erlang package manager hex.pm.

Usage

Add to your global rebar3 config in ~/.config/rebar3/rebar.config:

{plugins, [rebar3_hex]}.

Usage

Authenticating User

If you already have a user for hex.pm run:

$ rebar3 hex user auth

Note that this will ask for your hex.pm username and password, as well as a password for encrypting your api token that has write permissions to the repository. When publishing a package you will have to give this password to decrypt the token in order to publish.

Private Organizations

Private organizations are treated as repositories that have a parent. The parent is found as the first part of a repository's name, separated from the organization by a :. So for an organization rebar3 on the main repository hexpm the name must be hexpm:rebar3.

~/.config/rebar3/rebar.config

{hex, [{repos, [
		#{name => <<"hexpm:rebar3">>}
	  ]}]}.

Read-Only Repo Key for CI

If you have a private organization or other private repository it is recommended that you use a repo specific auth token for reading from the repository in CI. To generate a token:

$ rebar3 hex repo auth <repo> generate
Generated key: abc123

Then in CI use whatever method is available for setting an environment variable to the token and add this call at the beginning of your CI runs to add the token to your rebar3 hex tokens:

$ rebar3 hex repo auth <repo> --key $REPO_KEY

Publishing Packages

Two functions are available for publishing applications to hex as packages. The first, hex publish, simply packages up what you have as is:

$ rebar3 hex publish

Note that it will display the details of what it is publishing (what files, the version, dependencies) and ask if it should continue, so be sure to read the output carefully and make sure it is publishing what you expected.

Another task, hex cut is available to provide some additional functionality around versioning and git tags:

$ rebar3 hex cut

This command will ask how to increment (major, minor, patch) the version number based on the last version and can create a git tag and push that tag upstream.

Publishing Docs

$ rebar3 hex docs

Adding and Removing Owners of Packages

Owners can be added and removed for packages you are an owner of with the hex owner command:

$ rebar3 hex owner [add | remove] <package> <email>

rebar3_hex's People

Contributors

benoitc avatar dumbbell avatar egobrain avatar ericmj avatar f3c0 avatar ferd avatar filmor avatar g-andrade avatar gleber avatar jfacorro avatar jkrukoff avatar knusbaum avatar ksallberg avatar kubaodias avatar licenser avatar msch avatar paulo-ferraz-oliveira avatar pbrudnick avatar philss avatar sirwumpus avatar starbelly avatar tsloughter avatar wojtekmach avatar yohaneskuma avatar yuce avatar yurrriq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.