hex_tarball.create

You're seeing just the function create, go back to hex_tarball module for more information.

Specs

create(metadata(), files()) ->
          {ok, #{tarball => tarball(), outer_checksum => checksum(), inner_checksum => tarball()}} |
          {error, term()}.
Link to this function

create(Metadata, Files, Config)

View Source

Specs

create(metadata(), files(), hex_core:config()) ->
          {ok, #{tarball => tarball(), outer_checksum => checksum(), inner_checksum => tarball()}} |
          {error, term()}.

Creates a package tarball.

Returns the binary of the tarball the "inner checksum" and "outer checksum". The inner checksum is deprecated in favor of the outer checksum.

Examples:

  > Metadata = #{<<"name">> => <<"foo">>, <<"version">> => <<"1.0.0">>},
  > Files = [{"src/foo.erl", <<"-module(foo).">>}],
  > hex_tarball:create(Metadata, Files).
  {ok, #{tarball => <<86,69,...>>,
         outer_checksum => <<40,32,...>>,
         inner_checksum => <<178,12,...>>}}