-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (42 loc) · 1.04 KB
/
Makefile
File metadata and controls
52 lines (42 loc) · 1.04 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
BUILD_CONFIGURATION ?= Debug
MACOSX_DEPLOYMENT_TARGET ?= 14.0
ifdef RELEASE
BUILD_CONFIGURATION := Release
endif
.DEFAULT_GOAL := run
.PHONY: build
build:
@xcodebuild build \
-project WhichSpace.xcodeproj \
-scheme WhichSpace \
-configuration $(BUILD_CONFIGURATION) \
-destination 'platform=macOS' \
MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET)
.PHONY: check
check:
@swiftformat --lint .
.PHONY: fix
fix: fmt
@swiftlint --fix .
.PHONY: fmt
fmt:
@swiftformat .
.PHONY: lint
lint:
@swiftlint lint --strict
.PHONY: run
run:
@pkill -x WhichSpace || :
@rm -rf ~/Library/Developer/Xcode/DerivedData/WhichSpace-*/Build/Products/Debug/WhichSpace.app
@xcodebuild -scheme WhichSpace -configuration Debug build
@open ~/Library/Developer/Xcode/DerivedData/WhichSpace-*/Build/Products/Debug/WhichSpace.app
.PHONY: test
test:
@xcodebuild test \
-project WhichSpace.xcodeproj \
-scheme WhichSpace \
-destination 'platform=macOS' \
MACOSX_DEPLOYMENT_TARGET=$(MACOSX_DEPLOYMENT_TARGET)
.PHONY: update
update:
@swift package update