diff options
author | Loïc Hoguin <[email protected]> | 2018-12-05 17:48:50 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-12-05 17:52:59 +0100 |
commit | b1642f509f3473d9507c0850d80b3da611321c67 (patch) | |
tree | 3025e7d3081be1b8ed9173cc35be79acb7a3323d /early-plugins.mk | |
parent | 830ede54244f1e0e3644225e64b8fa9da90a196c (diff) | |
download | ci.erlang.mk-b1642f509f3473d9507c0850d80b3da611321c67.tar.gz ci.erlang.mk-b1642f509f3473d9507c0850d80b3da611321c67.tar.bz2 ci.erlang.mk-b1642f509f3473d9507c0850d80b3da611321c67.zip |
Add AUTO_CI_MASTER
Value can be daily, weekly or monthly and master will be
rebuilt when the time has expired.
Diffstat (limited to 'early-plugins.mk')
-rw-r--r-- | early-plugins.mk | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/early-plugins.mk b/early-plugins.mk index 6fe2af1..88f387d 100644 --- a/early-plugins.mk +++ b/early-plugins.mk @@ -60,10 +60,39 @@ OTP-DROPPED := $(OTP-18-DROPPED) $(OTP-19-DROPPED) $(OTP-20-DROPPED) $(OTP-21-DR # Configure Erlang.mk's CI plugin. -CI_OTP := $(foreach otp,$(AUTO_CI_OTP),$($(otp))) +CI_OTP := $(foreach otp,$(AUTO_CI_OTP),$($(otp))) $(if $(AUTO_CI_MASTER),master) CI_HIPE := $(foreach otp,$(AUTO_CI_HIPE),$($(otp))) CI_ERLLVM := $(foreach otp,$(AUTO_CI_ERLLVM),$($(otp))) +# Remove the existing master if necessary. + +ifdef AUTO_CI_MASTER + +ifeq ($(AUTO_CI_MASTER),daily) +AUTO_CI_MASTER_MINS = 1440 +else +ifeq ($(AUTO_CI_MASTER),weekly) +AUTO_CI_MASTER_MINS = 10080 +else +ifeq ($(AUTO_CI_MASTER),monthly) +AUTO_CI_MASTER_MINS = 43200 +endif +endif +endif + +ifdef AUTO_CI_MASTER_MINS +ci:: $(KERL) +ifneq ($(wildcard $(KERL_INSTALL_DIR)/master),) + $(verbose) if find $(KERL_INSTALL_DIR)/master/activate \ + -mmin +$(AUTO_CI_MASTER_MINS) | grep -q master; then \ + $(KERL) delete build master || true; \ + $(KERL) delete installation master || true; \ + fi +endif +endif + +endif + # Cleanup older OTP versions we don't care about anymore. CI_AUTO_CLEANUP_TARGETS := $(foreach t,$(OTP-DROPPED),ci-auto-cleanup-$t) |