aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2016-10-25 14:53:21 +0300
committerLoïc Hoguin <[email protected]>2016-10-25 14:53:21 +0300
commit7dc5d883ed074900f82784de51f6512c94c58eb7 (patch)
tree28c183e41ae4a14cf644ef92a70e2b5d4b11ca52
parenta4c5491f49e2f5ab8cdd83e6f1b20080da8af2da (diff)
downloaderlang.mk-7dc5d883ed074900f82784de51f6512c94c58eb7.tar.gz
erlang.mk-7dc5d883ed074900f82784de51f6512c94c58eb7.tar.bz2
erlang.mk-7dc5d883ed074900f82784de51f6512c94c58eb7.zip
Fetch kerl using git
Safer than through insecure HTTPS.
-rw-r--r--plugins/ci.mk22
1 files 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::