-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (49 loc) · 1.46 KB
/
Makefile
File metadata and controls
58 lines (49 loc) · 1.46 KB
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
53
54
55
56
57
58
SHELL := /bin/bash
ENGINE ?= podman
TAG ?= latest
REPO ?= optv
all: check
.PHONY: all
check: | check-shellcheck check-bashate check-markdownlint
.PHONY: check
ifeq ($(shell which shellcheck 2>/dev/null),)
check-shellcheck:
@echo "Skipping shellcheck: Not installed"
else
check-shellcheck:
find . -name '*.sh' -not -path './vendor/*' -not -path './git/*' -print0 \
| xargs -0 --no-run-if-empty shellcheck
endif
.PHONY: check-shellcheck
ifeq ($(shell which bashate 2>/dev/null),)
check-bashate:
@echo "Skipping bashate: Not installed"
else
# Ignored bashate errors/warnings:
# E006 Line too long
check-bashate:
find . -name '*.sh' -not -path './vendor/*' -not -path './git/*' -print0 \
| xargs -0 --no-run-if-empty bashate -e 'E*' -i E006
endif
.PHONY: check-bashate
ifeq ($(shell which markdownlint 2>/dev/null),)
check-markdownlint:
@echo "Skipping markdownlint: Not installed"
else
check-markdownlint:
find . -name '*.md' -not -path './vendor/*' -not -path './git/*' -print0 \
| xargs -0 --no-run-if-empty markdownlint
endif
.PHONY: check-markdownlint
check_var_defined = \
$(if $(value $1),, \
$(error $1 must be set))
check_optv_defined = \
$(call check_var_defined,OPTV_HOST) \
$(call check_var_defined,OPTV_REGPORT)
optv-build: check
$(call check_optv_defined)
podman build -t $(OPTV_HOST):$(OPTV_REGPORT)/$(REPO)/builder:$(TAG) optv-build
optv-push: optv-build
$(call check_optv_defined)
podman push $(OPTV_HOST):$(OPTV_REGPORT)/$(REPO)/builder:$(TAG)