forked from kubevirt/common-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
49 lines (37 loc) · 1.15 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
SHELL=/bin/bash
# i.e. fedora28.yaml
ALL_META_TEMPLATES=$(wildcard templates/*.yaml)
ALL_PRESETS=$(wildcard presets/*.yaml)
METASOURCES=$(ALL_META_TEMPLATES) $(ALL_PRESETS)
# Make sure the version is defined
export VERSION=$(shell ./version.sh)
export REVISION=$(shell ./revision.sh)
dist/templates/%.yaml: generate
dist/common-templates.yaml: generate
( \
echo -n "# Version " ; \
git describe --always --tags HEAD ; \
for F in $(ALL_PRESETS) dist/templates/*.yaml; \
do \
echo "---" ; \
echo "# Source: $$F" ; \
cat $$F ; \
done ; \
) >$@
release: dist/common-templates.yaml
cp dist/common-templates.yaml dist/common-templates-$(VERSION).yaml
e2e-tests:
./automation/test.sh
go-tests:
go test -v ./tests/
unit-tests:
./automation/unit-tests.sh
validate-no-offensive-lang:
./automation/validate-no-offensive-lang.sh
generate: generate-templates.yaml $(METASOURCES)
# Just build the XML files, no need to export to tarball
make -C osinfo-db/ OSINFO_DB_EXPORT=echo
ansible-playbook generate-templates.yaml
update-osinfo-db:
git submodule update --remote osinfo-db
.PHONY: all generate release e2e-tests unit-tests go-tests