-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (24 loc) · 876 Bytes
/
Makefile
File metadata and controls
34 lines (24 loc) · 876 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
CHARTS = helm-charts
# see: https://stackoverflow.com/a/6145814/876884
FILTER_OUT = $(foreach v,$(2),$(if $(findstring $(1),$(v)),,$(v)))
SUBDIRS := $(call FILTER_OUT, charts, $(wildcard images/*/.))
NOW := $(shell date -u '+%Y-%m-%dT%H-%M-%Sz')
ci: $(SUBDIRS) helm-commit
$(CHARTS):
git clone --depth 1 git@github.com:The-Next-Bug/helm-charts.git $(CHARTS)
helm-commit: $(SUBDIRS)
cd $(CHARTS) \
&& git add . \
&& git commit -a -m 'CI: Updating site-deploy image tags' \
&& git push
# see: https://stackoverflow.com/a/17845120/876884
$(SUBDIRS): $(CHARTS)
cd $(CHARTS) && git pull --ff-only
@$(MAKE) -w -C $@ NOW=$(NOW) TAG_PATH=$(CURDIR)/$(CHARTS)/site-deploy $(MAKECMDGOALS)
# Update all submodules
ci-update:
git submodule update --remote --rebase
git add .
git commit -m "Updating submodules..."
git push
.PHONY: $(SUBDIRS) ci update helm-commit