-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathMakefile
More file actions
94 lines (65 loc) · 1.93 KB
/
Makefile
File metadata and controls
94 lines (65 loc) · 1.93 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
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
87
88
89
90
91
92
93
94
# Keep the Makefile POSIX-compliant. We currently allow hyphens in
# target names, but that may change in the future.
#
# See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html.
.POSIX:
PNPM = pnpm -C ./Extension
# Init the repo
init: tools
git config core.hooksPath ./scripts/hooks
# Generate ContentBlockerConverterVersion.swift file
codegen:
./scripts/make/verifychangelog.sh $(VERSION)
./scripts/make/codegen.sh $(VERSION)
# Makes sure that the necessary tools are installed
tools:
swift --version
swiftlint --version
xcbeautify --version
periphery version
node --version
npm --version
pnpm --version
npx markdownlint --version
# Building debug builds
build: swift-build js-build
swift-build:
swift build
js-build:
$(PNPM) install && $(PNPM) build
# Building release builds
release: swift-release js-release
swift-release:
swift build -c release
js-release:
$(PNPM) install && $(PNPM) package
# Linter commands
lint: md-lint swift-lint js-lint
md-lint:
npx markdownlint .
swift-lint: swiftlint-lint swiftformat-lint periphery-lint
swiftlint-lint:
swiftlint lint --strict --quiet
swiftformat-lint:
swift format lint --recursive --strict .
periphery-lint:
periphery scan --retain-public --quiet --strict --clean-build
js-lint:
$(PNPM) install && $(PNPM) lint
# Testing
test: swift-test js-test filelock-test command-line-wrapper-test webkit-test
webkit-test:
/usr/bin/defaults read /System/Library/Frameworks/WebKit.framework/Resources/Info CFBundleVersion
swift test --filter WebKitCompilation
test-performance:
bash scripts/perf/profile.sh
swift-test:
swift test --quiet
js-test:
$(PNPM) install && CI=1 $(PNPM) test
filelock-test:
swift build -c release --product FileLockTester
./scripts/tests/file_lock_test.sh .build/release/FileLockTester
command-line-wrapper-test:
swift build -c release --product ConverterTool
./scripts/tests/command_line_wrapper_test.sh .build/release/ConverterTool