Metadata ready for hex.pm release
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -6,6 +6,7 @@
|
||||
*.orig
|
||||
# build outputs
|
||||
.rebar/
|
||||
_build/
|
||||
rebar.cross_compile.config
|
||||
config.tmp
|
||||
*.pdb
|
||||
|
||||
37
rebar.config.script
Normal file
37
rebar.config.script
Normal 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:
|
||||
@@ -8,7 +8,7 @@
|
||||
{env, []},
|
||||
|
||||
%% 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"]},
|
||||
{maintainers, ["alexeyr", "ProcessOne"]},
|
||||
{links, [{"Github", "https://github.com/processone/erlang-sqlite3"}]}]}.
|
||||
|
||||
Reference in New Issue
Block a user