forked from grafana/grafana-ansible-collection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
86 lines (65 loc) · 2.33 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
.DEFAULT_GOAL:= lint
PATH := ./node_modules/.bin:$(PATH)
SHELL := /bin/bash
args = $(filter-out $@, $(MAKECMDGOALS))
.PHONY: all setup install clean reinstall build compile pdfs lint lint-sh lint-shell lint-md lint-markdown lint-txt lint-text pdf lint-yaml lint-yml lint-editorconfig lint-ec ci-lint ci-lint-shell ci-lint-markdown ci-lint-text ci-lint-yaml ci-lint-editorconfig lint-ansible ci-lint-ansible
default: all
all: install
####################################################################
# Installation / Setup #
####################################################################
setup:
@./tools/setup.sh
install:
yarn install
pipenv install
# remove the build and log folders
clean:
rm -rf build node_modules
# reinstall the node_modules and start with a fresh node build
reinstall: clean install
####################################################################
# Linting #
####################################################################
lint: lint-shell lint-markdown lint-text lint-yaml lint-editorconfig lint-ansible
# Note "|| true" is added to locally make lint can be ran and all linting is preformed, regardless of exit code
# Shell Linting
lint-sh lint-shell:
@./tools/lint-shell.sh || true
# Markdown Linting
lint-md lint-markdown:
@./tools/lint-markdown.sh || true
# Text Linting
lint-txt lint-text:
@./tools/lint-text.sh || true
# Yaml Linting
lint-yml lint-yaml:
@./tools/lint-yaml.sh || true
# Editorconfig Linting
lint-ec lint-editorconfig:
@./tools/lint-editorconfig.sh || true
# Ansible Linting
lint-ansible:
@./tools/lint-ansible.sh || true
####################################################################
# CI #
####################################################################
ci-lint: ci-lint-shell ci-lint-markdown ci-lint-text ci-lint-yaml ci-lint-editorconfig ci-lint-ansible
# Shell Linting
ci-lint-shell:
@./tools/lint-shell.sh
# Markdown Linting
ci-lint-markdown:
@./tools/lint-markdown.sh
# Text Linting
ci-lint-text:
@./tools/lint-text.sh
# Yaml Linting
ci-lint-yaml:
@./tools/lint-yaml.sh
# Editorconfig Linting
ci-lint-editorconfig:
@./tools/lint-editorconfig.sh
# Ansible Linting
ci-lint-ansible:
@./tools/lint-ansible.sh