-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
59 lines (48 loc) · 1.21 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
# This Makefile follows the advice in: https://tech.davis-hansson.com/p/make/
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -O inherit_errexit -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
ifeq ($(origin .RECIPEPREFIX), undefined)
> $(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later)
endif
.RECIPEPREFIX = >
help:
> echo "Available targets:"
> printf ' %s\n' $$(grep -P --only-matching '^[\w-]+(?=:)' Makefile)
.PHONY: help
.SILENT: help
.out:
> mkdir -p .out
clean:
> rm -rf .out
.PHONY: clean
lint: ensure-licensed
> deno lint
.PHONY: lint
check-format:
> deno fmt --check
.PHONY: check-format
apply-format:
> deno fmt
.PHONY: auto-format-files
test:
> deno test
.PHONY: test
ensure-licensed:
> UNLICENSED="$$(\
find . -name '*.ts' -not -path './examples/*' -exec \
grep -FL '// Copyright 2021 Hal Blackburn. All rights reserved. MIT license.' {} + \
|| test $$? -eq 1 \
)"
> if [[ $$UNLICENSED != "" ]]; then
> echo -e "Error: Not all modules contain the copyright header:\n$$UNLICENSED" 2>&1
> exit 1
> fi
.PHONY: ensure-licensed
.SILENT: ensure-licensed
bump-version:
> npx standard-version@^9.3.2
.PHONY: bump-version