aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/ci.mk
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2015-07-21 22:07:16 +0200
committerLoïc Hoguin <[email protected]>2015-07-21 22:07:16 +0200
commit8a32e4832c8d0192159927e7e434407f0e38eb18 (patch)
treee474de2e975bdedac08ab461a16f7f662c0a8fe7 /plugins/ci.mk
parent26ea355c28f674b168259aadc6847d46fafb313a (diff)
downloaderlang.mk-8a32e4832c8d0192159927e7e434407f0e38eb18.tar.gz
erlang.mk-8a32e4832c8d0192159927e7e434407f0e38eb18.tar.bz2
erlang.mk-8a32e4832c8d0192159927e7e434407f0e38eb18.zip
Tweaks to the ci plugin after trying CircleCI
For best results use 'make -k ci'. 'make ci-prepare' can be used to setup the OTP installations needed.
Diffstat (limited to 'plugins/ci.mk')
-rw-r--r--plugins/ci.mk10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/ci.mk b/plugins/ci.mk
index 11be218..8ec5b67 100644
--- a/plugins/ci.mk
+++ b/plugins/ci.mk
@@ -16,7 +16,9 @@ CI_OTP ?=
ifeq ($(strip $(CI_OTP)),)
ci::
else
-ci:: $(KERL) $(addprefix ci-,$(CI_OTP))
+ci:: $(addprefix ci-,$(CI_OTP))
+
+ci-prepare: $(addprefix $(CI_INSTALL_DIR)/,$(CI_OTP))
ci-setup::
@@ -25,7 +27,7 @@ ci_verbose = $(ci_verbose_$(V))
define ci_target
ci-$(1): $(CI_INSTALL_DIR)/$(1)
- -$(ci_verbose) \
+ $(ci_verbose) \
PATH="$(CI_INSTALL_DIR)/$(1)/bin:$(PATH)" \
CI_OTP_RELEASE="$(1)" \
CT_OPTS="-label $(1)" \
@@ -35,9 +37,11 @@ endef
$(foreach otp,$(CI_OTP),$(eval $(call ci_target,$(otp))))
define ci_otp_target
-$(CI_INSTALL_DIR)/$(1):
+ifeq ($(wildcard $(CI_INSTALL_DIR)/$(1)),)
+$(CI_INSTALL_DIR)/$(1): $(KERL)
$(KERL) build git $(OTP_GIT) $(1) $(1)
$(KERL) install $(1) $(CI_INSTALL_DIR)/$(1)
+endif
endef
$(foreach otp,$(CI_OTP),$(eval $(call ci_otp_target,$(otp))))