1
+ # use sane shell by default, as well as other settings
2
+ SHELL := bash
3
+ .SHELLFLAGS := -eu -o pipefail -c
4
+ .DELETE_ON_ERROR :
5
+ MAKEFLAGS += --warn-undefined-variables --no-builtin-rules
6
+ .DEFAULT_GOAL = help
7
+
8
+ # location for source files
9
+ SRC ?= src/
10
+
11
+ # Hack to make help rule work, given that rule has suffix ' ## <help text'.
12
+ # Minor adjustments to make it work properly with included files
13
+ .PHONY : help
14
+ help : # # This help dialog
15
+ @grep -hE ' ^[a-zA-Z-][a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST ) | sort -u -t: -k1,1 | awk ' BEGIN {FS = ":.*?## "}; {printf "\033[36m%-22s\033[0m %s\n", $$1, $$2}'
16
+
17
+ .PHONY : grep-tech-debt
18
+ grep-tech-debt : # # Grep for lines with various types of tech debt
19
+ @echo " ### ❗Checking for FIXMEs"
20
+ @git grep --line-number --ignore-case --extended-regexp ' # (fixme|xxx)' $(SRC ) || echo " No FIXMEs ✅"
21
+ @echo " ### 🚧 Silenced issues"
22
+ @git grep --line-number --ignore-case --extended-regexp ' # (noqa|type: ignore|xxx)' $(SRC ) || echo " No silenced issues ✅"
23
+ @echo " ### 🚧 TODOs"
24
+ @git grep --line-number --ignore-case --extended-regexp ' # (todo|tbd)' $(SRC ) || echo " No TODOs ✅"
25
+
26
+ # #####################################################################################################
27
+ # Common rules which probably should be present regardless of technologies, but implemented
28
+ # in specific files or root Makefile. Avoid modifying this file, because it would be updated by the template
29
+ #
30
+ # Note that specifying .PHONY here means actual implementation
31
+ # needs only rule body (repeating .PHONY is not needed)
32
+ # #####################################################################################################
33
+
34
+ .PHONY : deps
35
+ deps : # # Set installed dependencies (including dev) to match those in the lock file
36
+
37
+ .PHONY : build
38
+ build : # # Build project and/or container image(s)
39
+
40
+ .PHONY : build-dev
41
+ build-dev : # # Build project and/or container image(s) for local development/testing
42
+
43
+ # this rule should do asdf install, setup .envrc etc, anything that helps new devs in getting started
44
+ .PHONY : dev-setup
45
+ dev-setup : # # Prepare project ready for local development
46
+
47
+ .PHONY : fmt
48
+ fmt : # # Apply all automated formatters
49
+
50
+ .PHONY : release
51
+ release : # # Create new release
52
+
53
+ .PHONY : local-run
54
+ local-run : # # Run system locally without docker
55
+
56
+ .PHONY : docker-run
57
+ docker-run : # # Run system locally with docker
58
+
59
+ .PHONY : test
60
+ test : # # Run automated tests
61
+
62
+ .PHONY : lint
63
+ lint : # # Analyze code for issues/smells
0 commit comments