瀏覽代碼

Merge pull request #2421 from starbelly/update-hex-core-to-v0-7-0

Re-vendor hex_core in at 0.7.0
pull/2431/head
Fred Hebert 4 年之前
committed by GitHub
父節點
當前提交
f9885c98d5
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: 4AEE18F83AFDEB23
共有 24 個文件被更改,包括 165 次插入62 次删除
  1. +12
    -4
      bootstrap
  2. +0
    -3
      src/r3_hex_core.hrl
  3. +1
    -1
      src/vendored/r3_hex_api.erl
  4. +1
    -1
      src/vendored/r3_hex_api_key.erl
  5. +1
    -1
      src/vendored/r3_hex_api_package.erl
  6. +1
    -1
      src/vendored/r3_hex_api_package_owner.erl
  7. +42
    -5
      src/vendored/r3_hex_api_release.erl
  8. +1
    -1
      src/vendored/r3_hex_api_user.erl
  9. +7
    -3
      src/vendored/r3_hex_core.erl
  10. +3
    -0
      src/vendored/r3_hex_core.hrl
  11. +13
    -3
      src/vendored/r3_hex_erl_tar.erl
  12. +1
    -1
      src/vendored/r3_hex_erl_tar.hrl
  13. +1
    -1
      src/vendored/r3_hex_filename.erl
  14. +1
    -1
      src/vendored/r3_hex_http.erl
  15. +2
    -3
      src/vendored/r3_hex_http_httpc.erl
  16. +1
    -1
      src/vendored/r3_hex_pb_names.erl
  17. +1
    -1
      src/vendored/r3_hex_pb_package.erl
  18. +1
    -1
      src/vendored/r3_hex_pb_signed.erl
  19. +1
    -1
      src/vendored/r3_hex_pb_versions.erl
  20. +1
    -1
      src/vendored/r3_hex_registry.erl
  21. +1
    -1
      src/vendored/r3_hex_repo.erl
  22. +70
    -25
      src/vendored/r3_hex_tarball.erl
  23. +1
    -1
      src/vendored/r3_safe_erl_term.xrl
  24. +1
    -1
      vendor_hex_core.sh

+ 12
- 4
bootstrap 查看文件

@ -26,10 +26,10 @@ main(_) ->
rm_rf("_build/default/lib/rebar"),
rm_rf("_build/test/lib/rebar"),
%% We fetch a few deps from hex for boostraping,
%% so we must compile r3_safe_erl_term.xrl which
%% is part of hex_core.
compile_xrl_file("src/r3_safe_erl_term.xrl"),
filelib:ensure_dir("_build/bootstrap/lib/rebar/ebin/"),
os:putenv("REBAR_PROFILE", "bootstrap"),
compile_vendored(),
%% Fetch and build deps required to build rebar3
BaseDeps = [{providers, []}
@ -176,6 +176,14 @@ maybe_set_ipfamily({ok, _}, Family) ->
maybe_set_ipfamily(_, _Family) ->
ok.
compile_vendored() ->
compile_xrl_file("src/vendored/r3_safe_erl_term.xrl"),
Sources = filelib:wildcard(filename:join(["src/vendored", "*.erl"])),
OutDir = filename:absname("_build/bootstrap/lib/rebar/ebin"),
code:add_patha(OutDir),
Opts = [debug_info,{outdir, OutDir}, return | additional_defines()],
[compile_erl_file(X, Opts) || X <- Sources].
compile(App, FirstFiles) ->
Dir = filename:join(filename:absname("_build/default/lib/"), App),
filelib:ensure_dir(filename:join([Dir, "ebin", "dummy.beam"])),

+ 0
- 3
src/r3_hex_core.hrl 查看文件

@ -1,3 +0,0 @@
%% Vendored from hex_core v0.6.8, do not edit manually
-define(HEX_CORE_VERSION, "0.6.8").

src/r3_hex_api.erl → src/vendored/r3_hex_api.erl 查看文件

@ -1,4 +1,4 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
%% @hidden

src/r3_hex_api_key.erl → src/vendored/r3_hex_api_key.erl 查看文件

@ -1,4 +1,4 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
-module(r3_hex_api_key).
-export([

src/r3_hex_api_package.erl → src/vendored/r3_hex_api_package.erl 查看文件

@ -1,4 +1,4 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
-module(r3_hex_api_package).
-export([get/2, search/3]).

src/r3_hex_api_package_owner.erl → src/vendored/r3_hex_api_package_owner.erl 查看文件

@ -1,4 +1,4 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
-module(r3_hex_api_package_owner).
-export([

src/r3_hex_api_release.erl → src/vendored/r3_hex_api_release.erl 查看文件

@ -1,15 +1,18 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
-module(r3_hex_api_release).
-export([
delete/3,
get/3,
publish/2,
publish/3,
retire/4,
unretire/3
]).
-export_type([retirement_params/0, retirement_reason/0]).
-export_type([publish_params/0, retirement_params/0, retirement_reason/0]).
-type publish_params() :: [{replace, boolean()}].
-type retirement_reason() :: other | invalid | security | deprecated | renamed.
@ -74,12 +77,46 @@ get(Config, Name, Version) when is_map(Config) and is_binary(Name) and is_binary
%% '''
%% @end
-spec publish(r3_hex_core:config(), binary()) -> r3_hex_api:response().
publish(Config, Tarball) when is_map(Config) and is_binary(Tarball) ->
Path = r3_hex_api:build_repository_path(Config, ["publish"]),
publish(Config, Tarball) -> publish(Config, Tarball, []).
%% @doc
%% Publishes a new package release with query parameters.
%%
%% Supported query params :
%% - replace : boolean
%%
%% Examples:
%%
%% ```
%% > r3_hex_api_release:publish(r3_hex_core:default_config(), Tarball, [{replace, true}]).
%% {ok, {201, ..., #{
%% <<"checksum">> => <<"540d210d81f56f17f64309a4896430e727972499b37bd59342dc08d61dff74d8">>,
%% <<"docs_html_url">> => <<"https://hexdocs.pm/package/1.0.0/">>,
%% <<"downloads">> => 740,<<"has_docs">> => true,
%% <<"html_url">> => <<"https://hex.pm/packages/package/1.0.0">>,
%% <<"inserted_at">> => <<"2014-12-09T18:32:03Z">>,
%% <<"meta">> =>
%% #{<<"app">> => <<"package">>,
%% <<"build_tools">> => [<<"mix">>]},
%% <<"package_url">> => <<"https://hex.pm/api/packages/package">>,
%% <<"publisher">> => nil,<<"requirements">> => #{},
%% <<"retirement">> => nil,
%% <<"updated_at">> => <<"2019-07-28T21:12:11Z">>,
%% <<"url">> => <<"https://hex.pm/api/packages/package/releases/1.0.0">>,
%% <<"version">> => <<"1.0.0">>
%% }}}
%% '''
%% @end
-spec publish(hexcore:config(), binary(), publish_params()) -> r3_hex_api:response().
publish(Config, Tarball, Params) when is_map(Config) andalso is_binary(Tarball) andalso is_list(Params)->
QueryString = r3_hex_api:encode_query_string([{replace, proplists:get_value(replace, Params, false)}]),
Path = r3_hex_api:join_path_segments(r3_hex_api:build_repository_path(Config, ["publish"])),
PathWithQuery = <<Path/binary, "?", QueryString/binary>>,
TarballContentType = "application/octet-stream",
Config2 = put_header(<<"content-length">>, integer_to_binary(byte_size(Tarball)), Config),
Body = {TarballContentType, Tarball},
r3_hex_api:post(Config2, Path, Body).
r3_hex_api:post(Config2, PathWithQuery, Body).
%% @doc
%% Deletes a package release.

src/r3_hex_api_user.erl → src/vendored/r3_hex_api_user.erl 查看文件

@ -1,4 +1,4 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
-module(r3_hex_api_user).
-export([

src/r3_hex_core.erl → src/vendored/r3_hex_core.erl 查看文件

@ -1,4 +1,4 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
%% @doc
%% hex_core entrypoint module.
@ -69,7 +69,9 @@ J1i2xWFndWa6nfFnRxZmCStCOZWYYPlaxr+FZceFbpMwzTNs4g3d4tLNUcbKAIH4
repo_url => binary(),
repo_organization => binary() | undefined,
repo_verify => boolean(),
repo_verify_origin => boolean()
repo_verify_origin => boolean(),
tarball_max_size => pos_integer(),
tarball_max_uncompressed_size => pos_integer()
}.
-spec default_config() -> config().
@ -82,6 +84,7 @@ default_config() ->
http_adapter => r3_hex_http_httpc,
http_adapter_config => #{profile => default},
http_etag => undefined,
http_headers => #{},
http_user_agent_fragment => <<"(httpc)">>,
repo_key => undefined,
repo_name => <<"hexpm">>,
@ -90,5 +93,6 @@ default_config() ->
repo_organization => undefined,
repo_verify => true,
repo_verify_origin => true,
http_headers => #{}
tarball_max_size => 8 * 1024 * 1024,
tarball_max_uncompressed_size => 64 * 1024 * 1024
}.

+ 3
- 0
src/vendored/r3_hex_core.hrl 查看文件

@ -0,0 +1,3 @@
%% Vendored from hex_core v0.7.0, do not edit manually
-define(HEX_CORE_VERSION, "0.7.0").

src/r3_hex_erl_tar.erl → src/vendored/r3_hex_erl_tar.erl 查看文件

@ -1,4 +1,4 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
%% @private
%% Copied from https://github.com/erlang/otp/blob/OTP-20.0.1/lib/stdlib/src/erl_tar.erl
@ -11,6 +11,7 @@
%% - Add safe_relative_path_links/2 to check directory traversal vulnerability when extracting files,
%% it differs from OTP's current fix (2020-02-04) in that it checks regular files instead of
%% symlink targets. This allows creating symlinks with relative path targets such as `../tmp/log`
%% - Remove ram_file usage (backported from OTP master)
%%
%% %CopyrightBegin%
@ -335,10 +336,19 @@ do_open(Name, Mode) when is_list(Mode) ->
{error, {Name, Reason}}
end.
open1({binary,Bin}, read, _Raw, Opts) when is_binary(Bin) ->
open1({binary,Bin0}, read, _Raw, Opts) when is_binary(Bin0) ->
Bin = case lists:member(compressed, Opts) of
true ->
try
zlib:gunzip(Bin0)
catch
_:_ -> Bin0
end;
false ->
Bin0
end,
case file:open(Bin, [ram,binary,read]) of
{ok,File} ->
_ = [ram_file:uncompress(File) || Opts =:= [compressed]],
{ok, #reader{handle=File,access=read,func=fun file_op/2}};
Error ->
Error

src/r3_hex_erl_tar.hrl → src/vendored/r3_hex_erl_tar.hrl 查看文件

@ -1,4 +1,4 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
% Copied from https://github.com/erlang/otp/blob/OTP-20.0.1/lib/stdlib/src/erl_tar.hrl

src/r3_hex_filename.erl → src/vendored/r3_hex_filename.erl 查看文件

@ -1,4 +1,4 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
% @private
% Excerpt from https://github.com/erlang/otp/blob/OTP-20.0.1/lib/stdlib/src/filename.erl#L761-L788

src/r3_hex_http.erl → src/vendored/r3_hex_http.erl 查看文件

@ -1,4 +1,4 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
-module(r3_hex_http).
-export([request/5]).

src/r3_hex_http_httpc.erl → src/vendored/r3_hex_http_httpc.erl 查看文件

@ -1,4 +1,4 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
%% @hidden
@ -13,8 +13,7 @@
request(Method, URI, ReqHeaders, Body, AdapterConfig) ->
Profile = maps:get(profile, AdapterConfig, default),
Request = build_request(URI, ReqHeaders, Body),
case httpc:request(Method, Request, [{ssl, rebar_utils:ssl_opts(URI)}],
[{body_format, binary}], Profile) of
case httpc:request(Method, Request, [], [{body_format, binary}], Profile) of
{ok, {{_, StatusCode, _}, RespHeaders, RespBody}} ->
RespHeaders2 = load_headers(RespHeaders),
{ok, {StatusCode, RespHeaders2, RespBody}};

src/r3_hex_pb_names.erl → src/vendored/r3_hex_pb_names.erl 查看文件

@ -1,4 +1,4 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
%% -*- coding: utf-8 -*-
%% Automatically generated, do not edit

src/r3_hex_pb_package.erl → src/vendored/r3_hex_pb_package.erl 查看文件

@ -1,4 +1,4 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
%% -*- coding: utf-8 -*-
%% Automatically generated, do not edit

src/r3_hex_pb_signed.erl → src/vendored/r3_hex_pb_signed.erl 查看文件

@ -1,4 +1,4 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
%% -*- coding: utf-8 -*-
%% Automatically generated, do not edit

src/r3_hex_pb_versions.erl → src/vendored/r3_hex_pb_versions.erl 查看文件

@ -1,4 +1,4 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
%% -*- coding: utf-8 -*-
%% Automatically generated, do not edit

src/r3_hex_registry.erl → src/vendored/r3_hex_registry.erl 查看文件

@ -1,4 +1,4 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
-module(r3_hex_registry).
-export([

src/r3_hex_repo.erl → src/vendored/r3_hex_repo.erl 查看文件

@ -1,4 +1,4 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
-module(r3_hex_repo).
-export([

src/r3_hex_tarball.erl → src/vendored/r3_hex_tarball.erl 查看文件

@ -1,13 +1,12 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
-module(r3_hex_tarball).
-export([create/2, create_docs/1, unpack/2, unpack_docs/2, format_checksum/1, format_error/1]).
-export([create/2, create/3, create_docs/1, create_docs/2, unpack/2, unpack/3,
unpack_docs/2, unpack_docs/3, format_checksum/1, format_error/1]).
-ifdef(TEST).
-export([do_decode_metadata/1, gzip/1, normalize_requirements/1]).
-endif.
-define(VERSION, <<"3">>).
-define(TARBALL_MAX_SIZE, 8 * 1024 * 1024).
-define(TARBALL_MAX_UNCOMPRESSED_SIZE, 64 * 1024 * 1024).
-define(BUILD_TOOL_FILES, [
{<<"mix.exs">>, <<"mix">>},
{<<"rebar.config">>, <<"rebar3">>},
@ -45,13 +44,16 @@
%% inner_checksum => <<178,12,...>>}}
%% '''
%% @end
-spec create(metadata(), files()) -> {ok, {tarball(), checksum()}} | {error, term()}.
create(Metadata, Files) ->
-spec create(metadata(), files(), r3_hex_core:config()) -> {ok, #{tarball => tarball(), outer_checksum => checksum(),
inner_checksum => tarball()}} | {error, term()}.
create(Metadata, Files, Config) ->
MetadataBinary = encode_metadata(Metadata),
ContentsTarball = create_memory_tarball(Files),
ContentsTarballCompressed = gzip(ContentsTarball),
InnerChecksum = inner_checksum(?VERSION, MetadataBinary, ContentsTarballCompressed),
InnerChecksumBase16 = encode_base16(InnerChecksum),
TarballMaxSize = maps:get(tarball_max_size, Config),
TarballMaxUncompressedSize = maps:get(tarball_max_uncompressed_size, Config),
OuterFiles = [
{"VERSION", ?VERSION},
@ -65,14 +67,22 @@ create(Metadata, Files) ->
UncompressedSize = byte_size(ContentsTarball),
case(byte_size(Tarball) > ?TARBALL_MAX_SIZE) or (UncompressedSize > ?TARBALL_MAX_UNCOMPRESSED_SIZE) of
true ->
{error, {tarball, too_big}};
case {(byte_size(Tarball) > TarballMaxSize), (UncompressedSize > TarballMaxUncompressedSize)} of
{_, true} ->
{error, {tarball, {too_big_uncompressed, TarballMaxUncompressedSize}}};
false ->
{true, _} ->
{error, {tarball, {too_big_compressed, TarballMaxSize}}};
{false, false} ->
{ok, #{tarball => Tarball, outer_checksum => OuterChecksum, inner_checksum => InnerChecksum}}
end.
-spec create(metadata(), files()) -> {ok, #{tarball => tarball(), outer_checksum => checksum(),
inner_checksum => tarball()}} | {error, term()}.
create(Metadata, Files) ->
create(Metadata, Files, r3_hex_core:default_config()).
%% @doc
%% Creates a docs tarball.
%%
@ -84,14 +94,14 @@ create(Metadata, Files) ->
%% {ok, <<86,69,...>>}
%% '''
%% @end
-spec create_docs(files()) -> {ok, tarball()}.
create_docs(Files) ->
-spec create_docs(files(), r3_hex_core:config()) -> {ok, tarball()} | {error, term()}.
create_docs(Files, #{tarball_max_size := TarballMaxSize, tarball_max_uncompressed_size := TarballMaxUncompressedSize}) ->
UncompressedTarball = create_memory_tarball(Files),
UncompressedSize = byte_size(UncompressedTarball),
Tarball = gzip(UncompressedTarball),
Size = byte_size(Tarball),
case(Size > ?TARBALL_MAX_SIZE) or (UncompressedSize > ?TARBALL_MAX_UNCOMPRESSED_SIZE) of
case(Size > TarballMaxSize) or (UncompressedSize > TarballMaxUncompressedSize) of
true ->
{error, {tarball, too_big}};
@ -99,6 +109,10 @@ create_docs(Files) ->
{ok, Tarball}
end.
-spec create_docs(files()) -> {ok, tarball()}.
create_docs(Files) ->
create_docs(Files, r3_hex_core:default_config()).
%% @doc
%% Unpacks a package tarball.
%%
@ -117,16 +131,18 @@ create_docs(Files) ->
%% {ok,#{outer_checksum => <<...>>,
%% metadata => #{<<"name">> => <<"foo">>, ...}}}
%% '''
-spec unpack(tarball(), memory) ->
{ok, #{checksum => checksum(), metadata => metadata(), contents => contents()}} |
-spec unpack(tarball(), memory, r3_hex_core:config()) ->
{ok, #{outer_checksum => checksum(), inner_checksum => checksum(),
metadata => metadata(), contents => contents()}} |
{error, term()};
(tarball(), filename()) ->
{ok, #{checksum => checksum(), metadata => metadata()}} |
(tarball(), filename(), r3_hex_core:config()) ->
{ok, #{outer_checksum => checksum(), inner_checksum => checksum(),
metadata => metadata()}} |
{error, term()}.
unpack(Tarball, _) when byte_size(Tarball) > ?TARBALL_MAX_SIZE ->
unpack(Tarball, _, #{tarball_max_size := TarballMaxSize}) when byte_size(Tarball) > TarballMaxSize ->
{error, {tarball, too_big}};
unpack(Tarball, Output) ->
unpack(Tarball, Output, _Config) ->
case r3_hex_erl_tar:extract({binary, Tarball}, [memory]) of
{ok, []} ->
{error, {tarball, empty}};
@ -139,6 +155,18 @@ unpack(Tarball, Output) ->
{error, {tarball, Reason}}
end.
-spec unpack(tarball(), memory) ->
{ok, #{outer_checksum => checksum(), inner_checksum => checksum(),
metadata => metadata(), contents => contents()}} |
{error, term()};
(tarball(), filename()) ->
{ok, #{outer_checksum => checksum(), inner_checksum => checksum(),
metadata => metadata()}} |
{error, term()}.
unpack(Tarball, Output) ->
unpack(Tarball, Output, r3_hex_core:default_config()).
%% @doc
%% Unpacks a documentation tarball.
%%
@ -151,14 +179,19 @@ unpack(Tarball, Output) ->
%% > r3_hex_tarball:unpack_docs(Tarball, "path/to/unpack").
%% ok
%% '''
-spec unpack_docs(tarball(), memory) -> {ok, contents()} | {error, term()};
(tarball(), filename()) -> ok | {error, term()}.
unpack_docs(Tarball, _) when byte_size(Tarball) > ?TARBALL_MAX_SIZE ->
-spec unpack_docs(tarball(), memory, r3_hex_core:config()) -> {ok, contents()} | {error, term()};
(tarball(), filename(), r3_hex_core:config()) -> ok | {error, term()}.
unpack_docs(Tarball, _, #{tarball_max_size := TarballMaxSize}) when byte_size(Tarball) > TarballMaxSize ->
{error, {tarball, too_big}};
unpack_docs(Tarball, Output) ->
unpack_docs(Tarball, Output, _Config) ->
unpack_tarball(Tarball, Output).
-spec unpack_docs(tarball(), memory) -> {ok, contents()} | {error, term()};
(tarball(), filename()) -> ok | {error, term()}.
unpack_docs(Tarball, Output) ->
unpack_docs(Tarball, Output, r3_hex_core:default_config()).
%% @doc
%% Returns base16-encoded representation of checksum.
-spec format_checksum(checksum()) -> binary().
@ -169,7 +202,11 @@ format_checksum(Checksum) ->
%% Converts an error reason term to a human-readable error message string.
-spec format_error(term()) -> string().
format_error({tarball, empty}) -> "empty tarball";
format_error({tarball, too_big}) -> "tarball is too big";
format_error({tarball, {too_big_uncompressed, Size}}) ->
io_lib:format("package exceeds max uncompressed size ~w ~s", [format_byte_size(Size), "MB"]);
format_error({tarball, {too_big_compressed, Size}}) ->
io_lib:format("package exceeds max compressed size ~w ~s", [format_byte_size(Size), "MB"]);
format_error({tarball, {missing_files, Files}}) -> io_lib:format("missing files: ~p", [Files]);
format_error({tarball, {bad_version, Vsn}}) -> io_lib:format("unsupported version: ~p", [Vsn]);
format_error({tarball, invalid_checksum}) -> "invalid tarball checksum";
@ -186,6 +223,9 @@ format_error({checksum_mismatch, ExpectedChecksum, ActualChecksum}) ->
"Actual (base16-encoded): ~s",
[encode_base16(ExpectedChecksum), encode_base16(ActualChecksum)]).
format_byte_size(Size) ->
Size / 1000000.
%%====================================================================
%% Internal functions
%%====================================================================
@ -225,7 +265,12 @@ finish_unpack({error, _} = Error) ->
finish_unpack(#{metadata := Metadata, files := Files, inner_checksum := InnerChecksum, outer_checksum := OuterChecksum, output := Output}) ->
_ = maps:get("VERSION", Files),
ContentsBinary = maps:get("contents.tar.gz", Files),
filelib:ensure_dir(filename:join(Output, "*")),
case Output of
memory -> ok;
_ -> filelib:ensure_dir(filename:join(Output, "*"))
end,
case unpack_tarball(ContentsBinary, Output) of
ok ->
copy_metadata_config(Output, maps:get("metadata.config", Files)),

src/r3_safe_erl_term.xrl → src/vendored/r3_safe_erl_term.xrl 查看文件

@ -1,4 +1,4 @@
%% Vendored from hex_core v0.6.8, do not edit manually
%% Vendored from hex_core v0.7.0, do not edit manually
%%% Author : Robert Virding
%%% Purpose : Token definitions for Erlang.

+ 1
- 1
vendor_hex_core.sh 查看文件

@ -7,7 +7,7 @@ if [[ -z "$1" ]]; then
fi
source_dir=$1/src
target_dir=src
target_dir=src/vendored
prefix=r3_
hex_core_version=`cat $source_dir/hex_core.hrl | grep HEX_CORE_VERSION | cut -d'"' -f2`

Loading…
取消
儲存