Skip to content

Commit

Permalink
Merge pull request #45 from inaka/elbrujohalcon.368.katana
Browse files Browse the repository at this point in the history
[Fix inaka/elvis#368] Upgrade katana_code dep
  • Loading branch information
Brujo Benavides committed Mar 30, 2016
2 parents a893979 + bcc31bd commit b909be7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ DEP_PLUGINS = inaka_mk hexer_mk
dep_lager = git https://github.com/basho/lager.git 3.1.0
dep_zipper = hex 0.2.0
dep_katana = git https://github.com/inaka/erlang-katana.git 0.2.23
dep_katana_code = git https://github.com/inaka/katana-code.git 0.0.1
dep_katana_code = git https://github.com/inaka/katana-code.git 0.0.2
dep_katana_test = git https://github.com/inaka/katana-test.git 0.0.5
dep_mixer = git https://github.com/inaka/mixer.git 0.1.5
dep_meck = git https://github.com/eproxus/meck 0.8.4
Expand Down
21 changes: 9 additions & 12 deletions erlang.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST)))

ERLANG_MK_VERSION = 2.0.0-pre.2-88-g865bc1f
ERLANG_MK_VERSION = 2.0.0-pre.2-88-g9b5ebb4

# Core configuration.

Expand Down Expand Up @@ -1843,14 +1843,6 @@ pkg_gen_unix_fetch = git
pkg_gen_unix_repo = https://github.com/msantos/gen_unix
pkg_gen_unix_commit = master

PACKAGES += geode
pkg_geode_name = geode
pkg_geode_description = geohash/proximity lookup in pure, uncut erlang.
pkg_geode_homepage = https://github.com/bradfordw/geode
pkg_geode_fetch = git
pkg_geode_repo = https://github.com/bradfordw/geode
pkg_geode_commit = master

PACKAGES += getopt
pkg_getopt_name = getopt
pkg_getopt_description = Module to parse command line arguments using the GNU getopt syntax
Expand Down Expand Up @@ -4545,18 +4537,23 @@ endef
define dep_fetch_hex.erl
ssl:start(),
inets:start(),
Url =
case "$(3)" of
"" -> "https://s3.amazonaws.com/s3.hex.pm/tarballs/$(1)-$(2).tar";
_ -> "https://s3.amazonaws.com/s3.hex.pm/tarballs/$(3)-$(2).tar"
end,
{ok, {{_, 200, _}, _, Body}} = httpc:request(get,
{"https://s3.amazonaws.com/s3.hex.pm/tarballs/$(1)-$(2).tar", []},
{Url, []},
[], [{body_format, binary}]),
{ok, Files} = erl_tar:extract({binary, Body}, [memory]),
{_, Source} = lists:keyfind("contents.tar.gz", 1, Files),
ok = erl_tar:extract({binary, Source}, [{cwd, "$(call core_native_path,$(DEPS_DIR)/$1)"}, compressed]),
halt()
endef

# Hex only has a package version. No need to look in the Erlang.mk packages.
# Hex has a package version and optionally a package name. No need to look in the Erlang.mk packages.
define dep_fetch_hex
$(call erlang,$(call dep_fetch_hex.erl,$(1),$(strip $(word 2,$(dep_$(1))))));
$(call erlang,$(call dep_fetch_hex.erl,$(1),$(strip $(word 2,$(dep_$(1)))),$(strip $(word 3,$(dep_$(1))))));
endef

define dep_fetch_fail
Expand Down

0 comments on commit b909be7

Please sign in to comment.