forked from clearlinux/clr-distro-factory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (37 loc) · 1.31 KB
/
Makefile
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
HOSTNAME := $(shell hostname -f)
BUILD_DIR ?= $(CURDIR)/tmp/build
STAGING_DIR ?= $(CURDIR)/tmp/release
DSTREAM_DL_URL ?= http://${HOSTNAME}:8000/update
pipelines := common koji release watcher
common_CHECKOPTS := --exclude=2034,2164
common_SRC := $(wildcard *.sh)
koji_SRC := $(wildcard $(CURDIR)/koji/*.sh)
release_CHECKOPTS := --exclude=2013,2024,2155
release_SRC := $(wildcard $(CURDIR)/release/*.sh)
watcher_SRC := $(wildcard $(CURDIR)/watcher/*.sh)
SRC := $(common_SRC) $(koji_SRC) $(release_SRC) $(watcher_SRC)
release_STEPS := $(patsubst %.sh,%,$(release_SRC))
all:
@echo "use 'make release' to run all steps'"
@echo "use 'make STEP' to run individual steps: ${STEPS}"
@echo "use 'make serve' to run a webserver hosting updates"
${BUILD_DIR}:
mkdir -p $@
${STAGING_DIR}:
mkdir -p $@
.PHONY: $(release_STEPS)
$(release_STEPS): ${BUILD_DIR} ${STAGING_DIR}
BUILD_DIR=${BUILD_DIR} \
STAGING_DIR=${STAGING_DIR} \
DSTREAM_DL_URL=${DSTREAM_DL_URL} \
release/[email protected]
.NOTPARALLEL: release
release: prologue koji content mixer images stage
.PHONY: serve
serve: ${STAGING_DIR}
cd ${STAGING_DIR}; python -mSimpleHTTPServer
check_PIPELINES = $(addprefix check-,$(pipelines))
$(check_PIPELINES): pipe = $(patsubst check-%,%,$@)
$(check_PIPELINES):
shellcheck -x $($(pipe)_CHECKOPTS) $($(pipe)_SRC)
check: $(check_PIPELINES)