Metadata ready for hex.pm release

This commit is contained in:
Mickael Remond
2016-01-22 17:24:32 +01:00
parent 4b5936e418
commit 6ee3570060
3 changed files with 39 additions and 1 deletions

1
.gitignore vendored
View File

@@ -6,6 +6,7 @@
*.orig *.orig
# build outputs # build outputs
.rebar/ .rebar/
_build/
rebar.cross_compile.config rebar.cross_compile.config
config.tmp config.tmp
*.pdb *.pdb

37
rebar.config.script Normal file
View File

@@ -0,0 +1,37 @@
ModCfg0 = fun(F, Cfg, [Key|Tail], Op, Default) ->
{OldVal,PartCfg} = case lists:keytake(Key, 1, Cfg) of
{value, {_, V1}, V2} -> {V1, V2};
false -> {if Tail == [] -> Default; true -> [] end, Cfg}
end,
case Tail of
[] ->
[{Key, Op(OldVal)} | PartCfg];
_ ->
[{Key, F(F, OldVal, Tail, Op, Default)} | PartCfg]
end
end,
ModCfg = fun(Cfg, Keys, Op, Default) -> ModCfg0(ModCfg0, Cfg, Keys, Op, Default) end.
%% Rebar3 support for hex.pm support:
%% - Add rebar3_hex plugin
IsRebar3 = case application:get_key(rebar, vsn) of
{ok, VSN} ->
[VSN1 | _] = string:tokens(VSN, "-"),
[Maj, Min, Patch] = string:tokens(VSN1, "."),
(list_to_integer(Maj) >= 3);
undefined ->
lists:keymember(mix, 1, application:loaded_applications())
end,
Cfg = case IsRebar3 of
true ->
ModCfg(CONFIG, [plugins], fun(V) -> V ++ [rebar3_hex] end, []);
false ->
CONFIG
end,
Cfg.
%% Local Variables:
%% mode: erlang
%% End:
%% vim: set filetype=erlang tabstop=8:

View File

@@ -8,7 +8,7 @@
{env, []}, {env, []},
%% hex.pm packaging: %% hex.pm packaging:
{files, ["src/", "include/", "c_src/sqlite3_drv.c", "c_src/sqlite3_drv.h", "rebar.config", "README.md", "LICENSE"]}, {files, ["src/", "include/", "c_src/sqlite3_drv.c", "c_src/sqlite3_drv.h", "sqlite3_amalgamation/shell.c", "sqlite3_amalgamation/sqlite3.c", "sqlite3_amalgamation/sqlite3.h", "sqlite3_amalgamation/sqlite3ext.h", "rebar.config", "README.md", "LICENSE"]},
{licenses, ["EPL 1.1"]}, {licenses, ["EPL 1.1"]},
{maintainers, ["alexeyr", "ProcessOne"]}, {maintainers, ["alexeyr", "ProcessOne"]},
{links, [{"Github", "https://github.com/processone/erlang-sqlite3"}]}]}. {links, [{"Github", "https://github.com/processone/erlang-sqlite3"}]}]}.