From 7dc5d883ed074900f82784de51f6512c94c58eb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 25 Oct 2016 14:53:21 +0300 Subject: Fetch kerl using git Safer than through insecure HTTPS. --- plugins/ci.mk | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/plugins/ci.mk b/plugins/ci.mk index d90e366..dfb2f98 100644 --- a/plugins/ci.mk +++ b/plugins/ci.mk @@ -3,19 +3,25 @@ .PHONY: ci ci-prepare ci-setup distclean-kerl -KERL ?= $(CURDIR)/kerl +CI_OTP ?= + +ifeq ($(strip $(CI_OTP)),) +ci:: +else + +ifeq ($(strip $(KERL)),) +KERL := $(CURDIR)/.erlang.mk/kerl/kerl +endif + export KERL -KERL_URL ?= https://raw.githubusercontent.com/yrashk/kerl/master/kerl +KERL_GIT ?= https://github.com/kerl/kerl +KERL_COMMIT ?= master OTP_GIT ?= https://github.com/erlang/otp CI_INSTALL_DIR ?= $(HOME)/erlang -CI_OTP ?= -ifeq ($(strip $(CI_OTP)),) -ci:: -else ci:: $(addprefix ci-,$(CI_OTP)) ci-prepare: $(addprefix $(CI_INSTALL_DIR)/,$(CI_OTP)) @@ -48,7 +54,9 @@ endef $(foreach otp,$(CI_OTP),$(eval $(call ci_otp_target,$(otp)))) $(KERL): - $(gen_verbose) $(call core_http_get,$(KERL),$(KERL_URL)) + $(verbose) mkdir -p $(ERLANG_MK_TMP) + $(gen_verbose) git clone $(KERL_GIT) $(ERLANG_MK_TMP)/kerl + $(verbose) cd $(ERLANG_MK_TMP)/kerl && git checkout $(KERL_COMMIT) $(verbose) chmod +x $(KERL) help:: -- cgit v1.2.3