Skip to content

Commit a267d6b

Browse files
committed
Update erlang.mk
1 parent 5a6dc70 commit a267d6b

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

erlang.mk

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST)))
1818
export ERLANG_MK_FILENAME
1919

20-
ERLANG_MK_VERSION = 2.0.0-pre.2-304-g5a961bd
20+
ERLANG_MK_VERSION = 2.0.0-pre.2-311-gb20df2d
2121
ERLANG_MK_WITHOUT =
2222

2323
# Make 3.81 and 3.82 are deprecated.
@@ -187,9 +187,11 @@ ERLANG_MK_BUILD_DIR ?= .erlang.mk.build
187187

188188
erlang-mk: WITHOUT ?= $(ERLANG_MK_WITHOUT)
189189
erlang-mk:
190-
git clone $(ERLANG_MK_REPO) $(ERLANG_MK_BUILD_DIR)
191190
ifdef ERLANG_MK_COMMIT
191+
git clone $(ERLANG_MK_REPO) $(ERLANG_MK_BUILD_DIR)
192192
cd $(ERLANG_MK_BUILD_DIR) && git checkout $(ERLANG_MK_COMMIT)
193+
else
194+
git clone --depth 1 $(ERLANG_MK_REPO) $(ERLANG_MK_BUILD_DIR)
193195
endif
194196
if [ -f $(ERLANG_MK_BUILD_CONFIG) ]; then cp $(ERLANG_MK_BUILD_CONFIG) $(ERLANG_MK_BUILD_DIR)/build.config; fi
195197
$(MAKE) -C $(ERLANG_MK_BUILD_DIR) WITHOUT='$(strip $(WITHOUT))'
@@ -2880,6 +2882,14 @@ pkg_oauth2_fetch = git
28802882
pkg_oauth2_repo = https://github.com/kivra/oauth2
28812883
pkg_oauth2_commit = master
28822884

2885+
PACKAGES += observer_cli
2886+
pkg_observer_cli_name = observer_cli
2887+
pkg_observer_cli_description = Visualize Erlang/Elixir Nodes On The Command Line
2888+
pkg_observer_cli_homepage = http://zhongwencool.github.io/observer_cli
2889+
pkg_observer_cli_fetch = git
2890+
pkg_observer_cli_repo = https://github.com/zhongwencool/observer_cli
2891+
pkg_observer_cli_commit = master
2892+
28832893
PACKAGES += octopus
28842894
pkg_octopus_name = octopus
28852895
pkg_octopus_description = Small and flexible pool manager written in Erlang
@@ -4474,11 +4484,33 @@ define dep_autopatch_rebar.erl
44744484
end,
44754485
Write("\n")
44764486
end(),
4487+
GetHexVsn = fun(N) ->
4488+
case file:consult("$(call core_native_path,$(DEPS_DIR)/$1/rebar.lock)") of
4489+
{ok, Lock} ->
4490+
io:format("~p~n", [Lock]),
4491+
case lists:keyfind("1.1.0", 1, Lock) of
4492+
{_, LockPkgs} ->
4493+
io:format("~p~n", [LockPkgs]),
4494+
case lists:keyfind(atom_to_binary(N, latin1), 1, LockPkgs) of
4495+
{_, {pkg, _, Vsn}, _} ->
4496+
io:format("~p~n", [Vsn]),
4497+
{N, {hex, binary_to_list(Vsn)}};
4498+
_ ->
4499+
false
4500+
end;
4501+
_ ->
4502+
false
4503+
end;
4504+
_ ->
4505+
false
4506+
end
4507+
end,
44774508
fun() ->
44784509
File = case lists:keyfind(deps, 1, Conf) of
44794510
false -> [];
44804511
{_, Deps} ->
44814512
[begin case case Dep of
4513+
N when is_atom(N) -> GetHexVsn(N);
44824514
{N, S} when is_atom(N), is_list(S) -> {N, {hex, S}};
44834515
{N, S} when is_tuple(S) -> {N, S};
44844516
{N, _, S} -> {N, S};
@@ -6599,6 +6631,7 @@ distclean:: distclean-relx-rel
65996631
# Plugin-specific targets.
66006632

66016633
$(RELX):
6634+
$(verbose) mkdir -p $(ERLANG_MK_TMP)
66026635
$(gen_verbose) $(call core_http_get,$(RELX),$(RELX_URL))
66036636
$(verbose) chmod +x $(RELX)
66046637

0 commit comments

Comments
 (0)